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
← All changes | backend/src/ValueObjects/Entry/EntryField.php +2 -6 0.3 → 1.5.1 View file →
@@ -1,15 +1,11 @@
1 1 <?php
2 2
3 3 namespace IvyForms\ValueObjects\Entry;
4 4
5 -// phpcs:disable PSR1.Files.SideEffects
6 5 use IvyForms\Common\Exceptions\ValidationException;
6 +use IvyForms\Services\Translations\BackendStrings;
7 7
8 -if (!defined('ABSPATH')) {
9 - exit; // Exit if accessed directly
10 -}
11 -
12 8 /**
13 9 * Class EntryField
14 10 *
15 11 * Represents a single field value in a form entry.
@@ -104,9 +100,9 @@
104 100 */
105 101 private function validateId(int $id): int
106 102 {
107 103 if ($id < 0) {
108 - throw new ValidationException("Id must be a positive integer.");
104 + throw new ValidationException(BackendStrings::getExceptionStrings()['id_positive_integer']);
109 105 }
110 106 return $id;
111 107 }
112 108