Detailed Description

customizable validator for input elements

Definition at line 11 of file regEx.php.

Inheritance diagram for regEx:

Public Member Functions

 validate ($value, $parameters=array())
 validates value with regular expression More...
 setRegEx ($regEx)
 sets the validators regular expression More...
- Public Member Functions inherited from validator
 __construct ($log=null)
 validator constructor More...
 validate ($value, $parameters=array())
 default validator. More...
 getPatternAttribute ()
 returns validators' regular expression as HTML5 pattern attribute More...

Protected Attributes

 $regEx = "//"
 regular expression More...
- Protected Attributes inherited from validator
 log object More...

Additional Inherited Members

- Static Public Member Functions inherited from validator
static factory ($argument, $log=null)
 valdiator object factory More...
static isValid ($input)
- Protected Member Functions inherited from validator
 log ($argument, $type)
 error logging method More...

Member Function Documentation

setRegEx (   $regEx)

sets the validators regular expression

string$regExregular expression

Definition at line 50 of file regEx.php.

validate (   $value,
  $parameters = array() 

validates value with regular expression

string$valuevalue to be validated
array$parametersvalidation parameters
bool validation result

To make the pattern-matching HTML5 compliant the regular expression has to match the entire string. Since there is no preg_match flag for that, we compare the value with the matched substring.

set error type

Definition at line 25 of file regEx.php.

Field Documentation

$regEx = "//"

regular expression

Definition at line 16 of file regEx.php.

The documentation for this class was generated from the following file: