Class Validators
Validation utilities.
- Nette\Object
- Nette\Utils\Validators
public static
|
|
public static
|
#
assertField( array $arr, string $field, string $expected = NULL, string $label = "item '%' in array" )
Throws exception if an array field is missing or of unexpected type. |
public static
boolean
|
|
public static
boolean
|
|
public static
boolean
|
|
public static
boolean
|
|
public static
boolean
|
|
public static
boolean
|
|
public static
boolean
|
|
public static
boolean
|
|
public static
boolean
|
|
public static
boolean
|
|
public static
boolean
|
|
public static
boolean
|
|
public static
boolean
|
__call(),
__callStatic(),
__get(),
__isset(),
__set(),
__unset(),
extensionMethod(),
getReflection()
|
protected static
array
|
$validators | array(
'bool' => 'is_bool',
'boolean' => 'is_bool',
'int' => 'is_int',
'integer' => 'is_int',
'float' => 'is_float',
'number' => NULL, // is_int || is_float,
'numeric' => array(__CLASS__, 'isNumeric'),
'numericint' => array(__CLASS__, 'isNumericInt'),
'string' => 'is_string',
'unicode' => array(__CLASS__, 'isUnicode'),
'array' => 'is_array',
'list' => array('Nette\Utils\Arrays', 'isList'),
'object' => 'is_object',
'resource' => 'is_resource',
'scalar' => 'is_scalar',
'callable' => array(__CLASS__, 'isCallable'),
'null' => 'is_null',
'email' => array(__CLASS__, 'isEmail'),
'url' => array(__CLASS__, 'isUrl'),
'uri' => array(__CLASS__, 'isUri'),
'none' => array(__CLASS__, 'isNone'),
'type' => array(__CLASS__, 'isType'),
'identifier' => array(__CLASS__, 'isPhpIdentifier'),
'pattern' => NULL,
'alnum' => 'ctype_alnum',
'alpha' => 'ctype_alpha',
'digit' => 'ctype_digit',
'lower' => 'ctype_lower',
'upper' => 'ctype_upper',
'space' => 'ctype_space',
'xdigit' => 'ctype_xdigit',
) |
|
protected static
array
|
$counters | array(
'string' => 'strlen',
'unicode' => array('Nette\Utils\Strings', 'length'),
'array' => 'count',
'list' => 'count',
'alnum' => 'strlen',
'alpha' => 'strlen',
'digit' => 'strlen',
'lower' => 'strlen',
'space' => 'strlen',
'upper' => 'strlen',
'xdigit' => 'strlen',
) |
$reflection
|