Validator Class Reference
Detailed Description
Validator is is the single entry point for validation.
It chooses the configured validateType based on the validateTypeDesc parameter from the configuration section 'validators'.
Definition at line 23 of file Validator.php.
Static Public Member Functions | |
static | validate ($value, $validateDesc, $context=null) |
Static Protected Member Functions | |
static | getValidateType ($validateTypeName) |
Member Function Documentation
◆ validate()
|
static |
Validate the given value against the given validateType description.
- Parameters
-
$value The value to validate $validateDesc A string in the form validateTypeA,validateTypeB:optionsB, where validateType is a key in the configuration section 'validators' and options is a JSON encoded object as used in the 'validate_type' definition $context An associative array describing the validation context which will be passed to the ValidateType::validate() method (optional)
- Returns
- Boolean
Definition at line 35 of file Validator.php.
◆ getValidateType()
|
staticprotected |
Get the ValidateType instance for the given name.
- Parameters
-
$validateTypeName The validate type's name
- Returns
- ValidateType instance
Definition at line 84 of file Validator.php.