Skip to content

Commit 7764519

Browse files
nikophiljaviereguiluz
authored andcommitted
document "choices" wildcard in Choice validation constraint
1 parent f035ed4 commit 7764519

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)