Methods summary
public
|
|
public
Nethgui\System\Validator
|
|
public
Nethgui\System\Validator
|
#
memberOf( )
If the first and only argument is an array checks if current value is
in that array.
If the first and only argument is an array checks if current value is
in that array.
Otherwise you can pass arbitrary arguments. It will be checked if the
current value matches any of them.
Returns
|
public
Nethgui\System\Validator
|
#
regexp( string $e, string $meaning = 'valid_regexp' )
Parameters
- $e
- A PHP preg_match compatible regular expression
- $meaning
- The error message template
Returns
See
preg_match
|
public
Nethgui\System\Validator
|
#
notEmpty( )
Checks if current value is not empty
Checks if current value is not empty
Returns
See
PHP empty
|
public
Nethgui\System\Validator
|
#
isEmpty( )
Checks if current value is empty
Checks if current value is empty
Returns
See
PHP empty
|
public
Nethgui\System\Validator
|
#
forceResult( boolean $result )
Force the evaluation result
Force the evaluation result
Parameters
Returns
|
public
Nethgui\System\Validator
|
#
ipV4Address( )
Check if the given value is a valid IPv4 address
Check if the given value is a valid IPv4 address
Returns
|
public
Nethgui\System\Validator
|
#
hostname( integer $minDots = 0, integer $maxDots = PHP_INT_MAX )
Check if the given value is a valid host name
Check if the given value is a valid host name
Parameters
- $minDots
- Default 0
- $maxDots
- Default PHP_INT_MAX
Returns
|
public
Nethgui\System\Validator
|
|
public
Nethgui\System\Validator
|
|
public
Nethgui\System\Validator
|
|
public
Nethgui\System\Validator
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
Nethgui\System\Validator
|
#
not( )
Invert the evaluation result for the next rule.
Invert the evaluation result for the next rule.
Returns
|
public
Nethgui\System\Validator
|
#
username( )
Check if the value is a valid Unix user name
Check if the value is a valid Unix user name
Returns
|
public
|
#
date( $format = NULL )
Valid date
Default format is given by the current user language settings.
See
513
|
public
|
#
time( )
Valid time 24-hours format HH:MM(:SS)?
Valid time 24-hours format HH:MM(:SS)?
See
513
|
public
Nethgui\System\Validator
|
#
collectionValidator( Nethgui\System\Validator $v )
Check if the value is collection of elements satisfying the given validator
Check if the value is collection of elements satisfying the given validator
Parameters
Returns
|
public
Nethgui\System\Validator
|
#
platform( type $validatorName )
Invoke an external validation script
Invoke an external validation script
Parameters
Returns
Throws
InvalidArgumentException
|
public
Nethgui\System\Validator
|
#
email( )
The restricted mail address validator
The restricted mail address validator
Returns
See
1249
|
public
|
|
public
array
|
#
getFailureInfo( )
Tells why validation failed
Tells why validation failed
If evaluate() returns FALSE the validator object must return
an explanation of the problem as an array of arrays.
Returns
array An array of arrays of two elements: a template string and an array of arguments, to invoke strtr().
See
Api
Implementation of
|
public
boolean
|
#
evaluate( mixed $value )
Test if $value is accepted by this validator.
Test if $value is accepted by this validator.
Parameters
Returns
boolean
Api
Implementation of
|
protected
|
|
protected
|
|
protected
|
|
public
boolean
|
#
isMandatory( )
Tell if an empty value is NOT allowed.
Tell if an empty value is NOT allowed.
Returns
boolean FALSE if empty is allowed, TRUE otherwise.
Api
Implementation of
|