HTML_QuickForm
[ class tree: HTML_QuickForm ] [ index: HTML_QuickForm ] [ all elements ]

Class: HTML_QuickForm_Rule_Regex

Source Location: /HTML_QuickForm-3.2.13/QuickForm/Rule/Regex.php

Class Overview

HTML_QuickForm_Rule
   |
   --HTML_QuickForm_Rule_Regex

Validates values using regular expressions


Author(s):

Version:

  • Release: 3.2.13

Methods


Inherited Variables

Inherited Methods

Class: HTML_QuickForm_Rule

HTML_QuickForm_Rule::getValidationScript()
Returns the javascript test (the test should return true if the value is INVALID)
HTML_QuickForm_Rule::setName()
Sets the rule name
HTML_QuickForm_Rule::validate()
Validates a value

Class Details

[line 38]
Validates values using regular expressions


[ Top ]


Method Detail

addData   [line 87]

void addData( string $name, string $pattern)

Adds new regular expressions to the list
  • Access: public

Parameters:

string   $name     Name of rule
string   $pattern     Regular expression pattern

[ Top ]

getValidationScript   [line 93]

void getValidationScript( [ $options = null])


Overrides HTML_QuickForm_Rule::getValidationScript() (Returns the javascript test (the test should return true if the value is INVALID))

Parameters:

   $options     

[ Top ]

validate   [line 65]

boolean validate( string $value, [string $regex = null])

Validates a value using a regular expression
  • Return: true if value is valid
  • Access: public

Overrides HTML_QuickForm_Rule::validate() (Validates a value)

Parameters:

string   $value     Value to be checked
string   $regex     Regular expression

[ Top ]


Documentation generated on Sat, 01 Oct 2011 09:00:18 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.