class ValidationException extends RuntimeException

Validation exception.

Properties

protected array $errors Validation errors.
protected InputInterface|null $input Input.

Methods

__construct(array $errors, string $message = '', int $code = 0, Throwable|null $previous = null)

Constructor.

array
getErrors()

Returns the validation errors.

string
getMessageWithErrors()

Returns the exception message along with the validation errors.

setInput(InputInterface $input)

Sets the input.

getInput()

Returns the input.

Details

at line 47
__construct(array $errors, string $message = '', int $code = 0, Throwable|null $previous = null)

Constructor.

Parameters

array $errors Validation errors
string $message Exception code
int $code Exception message
Throwable|null $previous Previous exception

at line 59
array getErrors()

Returns the validation errors.

Return Value

array

at line 69
string getMessageWithErrors()

Returns the exception message along with the validation errors.

Return Value

string

at line 86
setInput(InputInterface $input)

Sets the input.

Parameters

InputInterface $input Input

at line 96
InputInterface|null getInput()

Returns the input.

Return Value

InputInterface|null