interface
Illuminate
/
Contracts
/
Validation
/
Validator
You are viewing an older version of the documentation. For the latest, please visit master documentation.
Validator
Methods
public
validate ( ) : array
Run the validator's rules against its data.
public
validated ( ) : array
Get the attributes and values that were validated.
public
fails ( ) : bool
Determine if the data fails the validation rules.
public
failed ( ) : array
Get the failed validation rules.
public
sometimes ( $attribute , $rules , callable $callback ) : $this
Add conditions to a given field based on a Closure.
Parameters
- $attribute string|array
- $rules string|array
- $callback callable
public
after ( $callback ) : $this
Add an after validation callback.
Parameters
- $callback callable|string