Validator
interface Validator implements MessageProvider (View source)
Methods
MessageBag | getMessageBag() Get the messages for the instance. | from MessageProvider |
bool | fails() Determine if the data fails the validation rules. | |
array | failed() Get the failed validation rules. | |
void | sometimes(string $attribute, string|array $rules, callable $callback) Add conditions to a given field based on a Closure. | |
$this | after(callable|string $callback) After an after validation callback. |
Details
MessageBag getMessageBag()
Get the messages for the instance.
bool fails()
Determine if the data fails the validation rules.
array failed()
Get the failed validation rules.
void sometimes(string $attribute, string|array $rules, callable $callback)
Add conditions to a given field based on a Closure.
$this after(callable|string $callback)
After an after validation callback.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.3/Illuminate/Contracts/Validation/Validator.html