17 lines
376 B
PHP
17 lines
376 B
PHP
<?php
|
|
|
|
namespace App\Exceptions;
|
|
|
|
use RuntimeException;
|
|
|
|
class FormValidationException extends RuntimeException
|
|
{
|
|
public array $errors;
|
|
|
|
public function __construct(array $errors, string $message = 'Validation failed', int $code = 0, ?\Throwable $previous = null)
|
|
{
|
|
$this->errors = $errors;
|
|
parent::__construct($message, $code, $previous);
|
|
}
|
|
}
|