daemon-idc/app/Exceptions/FormValidationException.php
2026-03-02 18:29:42 +09:00

21 lines
463 B
PHP

<?php
namespace App\Exceptions;
use RuntimeException;
class FormValidationException extends RuntimeException
{
private array $errors = [];
public function __construct(array $errors, string $message = 'Validation failed', int $code = 0, ?\Throwable $previous = null)
{
parent::__construct($message, $code, $previous);
$this->errors = $errors;
}
public function getErrors(): array
{
return $this->errors;
}
}