ValidationException
extends Exception
in package
Validation exceptions are generated after a value for data has been tested and it has been deemed as faulty. If this happens all errors gathered will be attached to this Exception and thrown to the application.
Tags
Table of Contents
- $result : array<string|int, ValidationError>
- The result of the validation.
- __construct() : mixed
- Creates a validation exception. This object will contain the errors that happened during validation of any information youu tested.
- getResult() : array<string|int, ValidationError>
- Returns the validation result that contains errors for the application to use and print the errors.
Properties
$result
The result of the validation.
private
array<string|int, ValidationError>
$result
Methods
__construct()
Creates a validation exception. This object will contain the errors that happened during validation of any information youu tested.
public
__construct(mixed $message, mixed $code, array<string|int, ValidationError> $errors) : mixed
Parameters
- $message : mixed
- $code : mixed
- $errors : array<string|int, ValidationError>
Return values
mixed —getResult()
Returns the validation result that contains errors for the application to use and print the errors.
public
getResult() : array<string|int, ValidationError>