interface
Illuminate
/
Contracts
/
Validation
/
Validator
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.
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