PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 6.2.15
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v6.2.15
6.2.15 6.2.14 6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 All 197 releases
← All changes | app/Services/Parser/Validations.php +17 -0 6.2.12 → 6.2.15 View file →
@@ -54,8 +54,21 @@
54 54 */
55 55 protected $messages = [];
56 56
57 57 /**
58 + * Rules the validator has no method for.
59 + *
60 + * Selection limits are counted against the field's own options in
61 + * Helper::validateSelectionLimits(), which runs later in the submission with
62 + * the raw field settings in hand — the only place the configured (or global)
63 + * message for the breach can be resolved. Emitting them here too would lean
64 + * on the validator silently ignoring rules it does not recognise.
65 + *
66 + * @var array
67 + */
68 + protected $rulesHandledElsewhere = ['min_selection', 'max_selection'];
69 +
70 + /**
58 71 * The validation extractor constructor.
59 72 *
60 73 * @param array $formFields
61 74 * @param array $formData
@@ -85,8 +98,12 @@
85 98 // If the field is a repeater we'll set some settings here.
86 99 $this->setRepeater($fieldName, $field);
87 100
88 101 foreach ($rules as $ruleName => $rule) {
102 + if (in_array($ruleName, $this->rulesHandledElsewhere, true)) {
103 + continue;
104 + }
105 +
89 106 if ($this->shouldNotSkipThisRule($rule, $fieldValue, $hasRequiredRule)) {
90 107 $this->prepareValidations($fieldName, $ruleName, $rule);
91 108 }
92 109 }