ValidationException
class ValidationException extends Exception
Properties
| int | $status | The status code to use for the response. |
|
| string|null | $redirectTo | The path the client should be redirected to. |
Methods
Create a new exception instance.
Create a new validation exception from a plain array of messages.
Get all of the validation error messages.
Set the HTTP status code to be used for the response.
Set the error bag on the exception.
Set the URL to redirect to on a validation error.
Get the underlying response instance.
Details
at line 32
__construct(Validator $validator, Response|null $response = null, string $errorBag = 'default')
Create a new exception instance.
at line 43
static ValidationException
withMessages(array $messages)
Create a new validation exception from a plain array of messages.
at line 57
static protected string
summarize(Validator $validator)
Create an error message summary from the validation errors.
at line 79
array
errors()
Get all of the validation error messages.
at line 87
ValidationException
status(int $status)
Set the HTTP status code to be used for the response.
at line 97
ValidationException
errorBag(string $errorBag)
Set the error bag on the exception.
at line 107
ValidationException
redirectTo(string $url)
Set the URL to redirect to on a validation error.
at line 117
Response|null
getResponse()
Get the underlying response instance.