Skip to content

Commit 84e17b0

Browse files
committed
docs: add upgrade instruction when validating an array without *
1 parent c1fc842 commit 84e17b0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

user_guide_src/source/installation/upgrade_416.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ Validation result changes
2020

2121
Due to a bug fix, the Validation now might change the validation results when you validate an array item (see :ref:`Changelog <changelog-v416-validation-changes>`). So check the validation results for all the code that validates the array. Validating multiple fields like ``contacts.*.name`` is not affected.
2222

23+
If you have the following form::
24+
25+
<input type='text' name='invoice_rule[1]'>
26+
<input type='text' name='invoice_rule[2]'>
27+
28+
And you have the validation rule like this::
29+
30+
'invoice_rule' => ['rules' => 'numeric', 'errors' => ['numeric' => 'Not numeric']]
31+
32+
Change the rule key to ``invoice_rule.*`` and the validation will work.
33+
2334
Breaking Enhancements
2435
*********************
2536

0 commit comments

Comments
 (0)