Class Validate
A validator service
- Wei\Base
-
Wei\Validate
public
mixed
|
|
public
boolean
|
|
protected
array
|
#
prepareProps( string $field, string $rule )
Prepare name and messages property option for rule validator |
public
mixed
|
|
public
mixed
|
|
public
array
|
|
public
array
|
|
public
boolean
|
|
public
boolean
|
|
public
mixed
|
|
public
array
|
|
public
array
|
|
public
array
|
|
public
array
|
|
public
array
|
|
public
boolean
|
|
public
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
mixed
|
|
public
array
|
|
public
mixed
|
|
public
mixed
|
|
public
mixed
|
|
public
array
|
|
public
array
|
|
public
array
|
|
public
string
|
#
getJoinedMessage( string $separator = "\n" )
Returns error message string connected by specified separator |
public
false|string
|
|
public
|
|
public
|
|
public
array
|
|
public
boolean
|
#
validateOne( string|
|
public
|
#
createRuleValidator( string $rule, array $options = array() )
Create a rule validator instance by specified rule name |
__call(),
__construct(),
__get(),
getOption(),
setOption()
|
protected
array
|
$rules
The validation rules |
#
array()
|
protected
array
|
$data
The data to be validated |
#
array()
|
protected
array
|
$messages
The invalid messages |
#
array()
|
protected
array
|
$names
The names for messages |
#
array()
|
protected
callable
|
$beforeValidate
The callback triggered before validation |
|
protected
callable
|
$ruleValid
The callback triggered when every rule is valid |
|
protected
callable
|
$ruleInvalid
The callback triggered when every rule is invalid |
|
protected
callable
|
$fieldValid
The callback triggered when every field is valid |
|
protected
callable
|
$fieldInvalid
The callback triggered when every field is invalid |
|
protected
callable
|
$success
The callback triggered after all rules are valid |
|
protected
callable
|
$failure
The callback triggered when the validation is invalid |
|
protected
boolean
|
$breakRule
Whether break the validation flow when any field's rule is not valid |
#
false
|
protected
boolean
|
$breakField
Whether break the validation flow when any field is not valid |
#
false
|
protected
boolean
|
$skip
Whether skip the current field validation when the filed's rule is not valid, so every field contains one invalid rule at most |
#
false
|
protected
string
|
$validRules
The valid rules array, which use the field as key, and the rules as value |
#
array()
|
protected
string
|
$invalidRules
The invalid rules array, which use the field as key, and the rules as value |
#
array()
|
protected
boolean|null
|
$result
The validation result |
|
protected
array<Validator\BaseValidator>
|
$ruleValidators
The rule validator instances |
#
array()
|
$providers,
$wei
|