Skip to content

Commit bf965a1

Browse files
committed
docs: add note for validation placeholders
1 parent 947a104 commit bf965a1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

user_guide_src/source/models/model.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,9 @@ replaced by the **value** of the matched incoming field. An example should clari
583583

584584
.. literalinclude:: model/038.php
585585

586+
.. note:: Since v4.3.5, you must set the validation rules for the placeholder
587+
field (``id``).
588+
586589
In this set of rules, it states that the email address should be unique in the database, except for the row
587590
that has an id matching the placeholder's value. Assuming that the form POST data had the following:
588591

@@ -594,6 +597,9 @@ then the ``{id}`` placeholder would be replaced with the number **4**, giving th
594597

595598
So it will ignore the row in the database that has ``id=4`` when it verifies the email is unique.
596599

600+
.. note:: Since v4.3.5, if the placeholder (``id``) value does not pass the
601+
validation, the placeholder would not be replaced.
602+
597603
This can also be used to create more dynamic rules at runtime, as long as you take care that any dynamic
598604
keys passed in don't conflict with your form data.
599605

0 commit comments

Comments
 (0)