Filter Class Reference
Detailed Description
Filter validates against the given php filter.
Configuration examples:
// FILTER_VALIDATE_INT with min_range option and FILTER_FLAG_ALLOW_HEX flag
filter:{"type":"int","options":{"options":{"min_range":0},"flags":2}}
// FILTER_VALIDATE_BOOLEAN simple and with FILTER_NULL_ON_FAILURE flag
filter:{"type":"boolean"}
filter:{"type":"boolean","options":{"flags":134217728}}
// FILTER_VALIDATE_REGEXP with regexp option
filter:{"type":"validate_regexp","options":{"options":{"regexp":"/^[0-9]*$/"}}}
Definition at line 35 of file Filter.php.
Inheritance diagram for Filter:
Public Member Functions | |
validate ($value, Message $message, $options=null) | |
Member Function Documentation
validate | ( | $value, | |
Message | $message, | ||
$options = null |
|||
) |
- See also
- ValidateType::validate $options is an associative array with keys 'type' and 'options' (optional)
Implements ValidateType.
Definition at line 41 of file Filter.php.