Method | Description | |
---|---|---|
have ( string $validator ) : boolean | Determine if a validator is implemented in this class | |
validate_email ( string $text, |
A validation function that returns an error if the value passed in is not a valid Email Address, as per RFC2822 and RFC2821. | |
validate_groupname ( $value, |
A validation function that returns an error if the the passed group name is unavailable | |
validate_range ( string $value, |
A validation function that returns an error if the value passed is not within a specified range | |
validate_regex ( string $value, |
A validation function that returns an error if the value passed does not match the regex specified. | |
validate_required ( $value, |
A validation function that returns an error if the value passed in is not set. | |
validate_same ( $value, |
A validation function that returns an error if the passed control values do not match | |
validate_url ( string $text, |
A validation function that returns an error if the value passed in is not a valid URL. | |
validate_username ( $value, |
A validation function that returns an error if the the passed username is unavailable | |
validate_wsse ( string $value, |
A validation function that returns an error if the form's WSSE values don't pass |
public static validate_email ( string $text, |
||
$text | string | A string to test if it is a valid Email Address |
$control | The control that defines the value | |
$form | The container that holds the control | |
$warning | string | An optional error message |
return | array | An empty array if the string is a valid Email Address, or an array with strings describing the errors |
public static validate_groupname ( $value, |
||
$control | The control that defines the value | |
$form | The container that holds the control | |
$allowed_name | string | An optional name which overrides the check and is always allowed |
$warning | string | An optional error message |
return | array | An empty array if the value exists, or an array with strings describing the errors |
public static validate_range ( string $value, |
||
$value | string | A value to test if it is empty |
$control | The control that defines the value | |
$container | The container that holds the control | |
$min | float | The minimum value, inclusive |
$max | float | The maximum value, inclusive |
$warning | string | An optional error message |
return | array | An empty array if the value is value, or an array with strings describing the errors |
public static validate_regex ( string $value, |
||
$value | string | A value to test if it is empty |
$control | The control that defines the value | |
$container | The container that holds the control | |
$regex | string | The regular expression to test against |
$warning | string | An optional error message |
return | array | An empty array if the value exists, or an array with strings describing the errors |
public static validate_required ( $value, |
||
$control | The control that defines the value | |
$form | The container that holds the control | |
$warning | string | An optional error message |
return | array | An empty array if the value exists, or an array with strings describing the errors |
public static validate_same ( $value, |
||
$control | The control that defines the value | |
$form | The container that holds the control | |
$matcher | The control which should have a matching value | |
$warning | string | An optional error message |
return | array | An empty array if the value exists, or an array with strings describing the errors |
public static validate_url ( string $text, |
||
$text | string | A string to test if it is a valid URL |
$control | The control that defines the value | |
$form | The container that holds the control | |
$warning | string | An optional error message |
return | array | An empty array if the string is a valid URL, or an array with strings describing the errors |
public static validate_username ( $value, |
||
$control | The control that defines the value | |
$form | The container that holds the control | |
$allowed_name | string | An optional name which overrides the check and is always allowed |
$warning | string | An optional error message |
return | array | An empty array if the value exists, or an array with strings describing the errors |
public static validate_wsse ( string $value, |
||
$value | string | The container's value, not very useful |
$control | The container that holds the WSSE controls | |
$form | The form that holds the container, probalby the same value | |
$warning | string | An optional error message |
return | array | An empty array if the value exists, or an array with strings describing the errors |