Skip to content

Commit

Permalink
docs: add upgrade instruction when validating an array without *
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Jan 6, 2022
1 parent c1fc842 commit 84e17b0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions user_guide_src/source/installation/upgrade_416.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ Validation result changes

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.

If you have the following form::

<input type='text' name='invoice_rule[1]'>
<input type='text' name='invoice_rule[2]'>

And you have the validation rule like this::

'invoice_rule' => ['rules' => 'numeric', 'errors' => ['numeric' => 'Not numeric']]

Change the rule key to ``invoice_rule.*`` and the validation will work.

Breaking Enhancements
*********************

Expand Down

0 comments on commit 84e17b0

Please sign in to comment.