| 1 | <?php |
||
| 29 | class Invalid extends \UnexpectedValueException implements \Caridea\Validate\Exception |
||
| 30 | { |
||
| 31 | /** |
||
| 32 | * @var array $errors Associative array of field name to error |
||
| 33 | */ |
||
| 34 | private $errors; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Creates a new Validation exception. |
||
| 38 | * |
||
| 39 | * @param array $errors Associative array of field name to error |
||
| 40 | */ |
||
| 41 | 1 | public function __construct(array $errors) |
|
| 46 | |||
| 47 | /** |
||
| 48 | * Gets the failed validation errors. |
||
| 49 | * |
||
| 50 | * @return array Associative array of field name to error |
||
| 51 | */ |
||
| 52 | 1 | public function getErrors(): array |
|
| 56 | } |
||
| 57 |