class
Illuminate
/
Validation
/
InvokableValidationRule
InvokableValidationRule
Implements
Uses
Properties
protected
$invokable ValidationRule |InvokableRule
The invokable that validates the attribute.
Default: null
protected
$failed bool
Indicates if the validation invokable failed.
Default: false
protected
$messages array
The validation error messages.
Default: []
protected
$data array
The data under validation.
Default: []
Methods
protected
__construct ( $invokable ) : void
Create a new explicit Invokable validation rule.
Parameters
- $invokable ValidationRule |InvokableRule
public
static
make ( $invokable ) : Rule
Create a new implicit or explicit Invokable validation rule.
Parameters
- $invokable ValidationRule |InvokableRule
public
passes ( $attribute , $value ) : bool
Determine if the validation rule passes.
Parameters
- $attribute string
- $value mixed
public
message ( ) : array
Get the validation error messages.
public
setData ( $data ) : $this
Set the data under validation.
Parameters
- $data array
public
setValidator ( $validator ) : $this
Set the current validator.
Parameters
- $validator Validator