ValidationException
class ValidationException extends RuntimeException
Validation exception.
Properties
protected array | $errors | Validation errors. | |
protected array | $meta | Exception meta. |
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.
addMeta(string $key, mixed $value)
Adds meta.
mixed
getMeta(string $key, mixed $default = null)
Gets meta.
Details
at line 49
__construct(array $errors, string $message = '', int $code = 0, Throwable|null $previous = null)
Constructor.
at line 61
array
getErrors()
Returns the validation errors.
at line 71
string
getMessageWithErrors()
Returns the exception message along with the validation errors.
at line 89
addMeta(string $key, mixed $value)
Adds meta.
at line 101
mixed
getMeta(string $key, mixed $default = null)
Gets meta.