class
Illuminate
/
Validation
/
ClosureValidationRule
ClosureValidationRule
Implements
Uses
Properties
public
$failed bool
Indicates if the validation callback failed.
Default: false
public
$messages array
The validation error messages.
Default: []
Methods
public
__construct ( $callback ) : void
Create a new Closure based validation rule.
Parameters
- $callback Closure
public
passes ( $attribute , $value ) : bool
Determine if the validation rule passes.
Parameters
- $attribute string
- $value mixed
public
message ( ) : string
Get the validation error messages.
public
setValidator ( $validator ) : $this
Set the current validator.
Parameters
- $validator Validator