validatorErrors = $message; parent::__construct("You have one or more validation errors", $code, $previous); } public function getValidatorErrors(): array { return $this->validatorErrors; } public function getFirstValidatorError(): array { return (array)array_shift($this->validatorErrors); } }