class
Illuminate
/
Validation
/
ClosureValidationRule
You are viewing an older version of the documentation. For the latest, please visit master documentation.
ClosureValidationRule
Implements
Properties
public
$failed bool
Indicates if the validation callback failed.
Default: false
public
$message string|null
The validation error message.
Default: null
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 message.