Skip to content

Commit 81f0fb8

Browse files
committed
minor #10836 document "choices" wildcard in Choice validation constraint (nikophil)
This PR was submitted for the 3.4 branch but it was merged into the master branch instead (closes #10836). Discussion ---------- document "choices" wildcard in Choice validation constraint Hello, here is a little doc update in order to document the `choices` wildcard introduced by symfony/symfony#29658 Commits ------- 7764519 document "choices" wildcard in Choice validation constraint
2 parents f035ed4 + 7764519 commit 81f0fb8

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

reference/constraints/Choice.rst

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -370,11 +370,17 @@ too few choices per the `min`_ option.
370370

371371
You can use the following parameters in this message:
372372

373-
+------------------+------------------------------------------------+
374-
| Parameter | Description |
375-
+==================+================================================+
376-
| ``{{ limit }}`` | The lower limit of choices |
377-
+------------------+------------------------------------------------+
373+
+--------------------+-------------------------------------------------------+
374+
| Parameter | Description |
375+
+====================+=======================================================+
376+
| ``{{ value }}`` | The current (invalid) value |
377+
+--------------------+-------------------------------------------------------+
378+
| ``{{ choices }}`` | String list of available choices, separated by comas |
379+
+--------------------+-------------------------------------------------------+
380+
381+
.. versionadded:: 4.3
382+
383+
The ``{{ choices }}`` parameter was introduced in Symfony 4.3.
378384

379385
maxMessage
380386
~~~~~~~~~~
@@ -386,10 +392,16 @@ too many options per the `max`_ option.
386392

387393
You can use the following parameters in this message:
388394

389-
+------------------+------------------------------------------------+
390-
| Parameter | Description |
391-
+==================+================================================+
392-
| ``{{ limit }}`` | The upper limit of choices |
393-
+------------------+------------------------------------------------+
395+
+--------------------+-------------------------------------------------------+
396+
| Parameter | Description |
397+
+====================+=======================================================+
398+
| ``{{ value }}`` | The current (invalid) value |
399+
+--------------------+-------------------------------------------------------+
400+
| ``{{ choices }}`` | String list of available choices, separated by comas |
401+
+--------------------+-------------------------------------------------------+
402+
403+
.. versionadded:: 4.3
404+
405+
The ``{{ choices }}`` parameter was introduced in Symfony 4.3.
394406

395407
.. include:: /reference/constraints/_payload-option.rst.inc

0 commit comments

Comments
 (0)