PluginProbe
The Innovative Form Builder – IvyForms / 1.5.1
The Innovative Form Builder – IvyForms v1.5.1
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
ivyforms / backend / src / Common / Exceptions / FieldValidationException.php

FieldValidationException.php in The Innovative Form Builder – IvyForms 1.5.1, at backend/src/Common/Exceptions/FieldValidationException.php

33 lines 902 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * @copyright © Melograno Venture Studio. All rights reserved.
5 * @licence See LICENCE.md for license details.
6 */
7
8 namespace IvyForms\Common\Exceptions;
9
10 /**
11 * Validation failure scoped to one or more form field keys (e.g. file-upload_0).
12 */
13 class FieldValidationException extends ValidationException
14 {
15 /**
16 * @param string $message Human-readable validation message.
17 * @param array<string, array{code: string}> $submissionFieldErrors Map of field key => error metadata.
18 */
19 public function __construct(string $message, array $submissionFieldErrors)
20 {
21 parent::__construct($message, 0, null, $submissionFieldErrors);
22 }
23
24 /**
25 * @return array<string, array{code: string}>
26 */
27 public function getSubmissionFieldErrors(): array
28 {
29 /** @var array<string, array{code: string}> */
30 return $this->getFieldErrors();
31 }
32 }
33