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 49
__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 61
array getErrors()

Returns the validation errors.

Return Value

array

at line 71
string getMessageWithErrors()

Returns the exception message along with the validation errors.

Return Value

string

at line 88
setInput(InputInterface $input)

Sets the input.

Parameters

InputInterface $input Input

at line 98
InputInterface|null getInput()

Returns the input.

Return Value

InputInterface|null