Skip to content

Commit d852a55

Browse files
committed
minor #21079 [Validator] Fix parameters list in Choice::$multipleMessage option (niconoe-)
This PR was submitted for the 7.3 branch but it was squashed and merged into the 6.4 branch instead. Discussion ---------- [Validator] Fix parameters list in Choice::$multipleMessage option Documentation says that `\Symfony\Component\Validator\Constraints\Choice::$multipleMessage` option can take parameters `{{ value }}` and `{{ label }}` in the message, but regarding `\Symfony\Component\Validator\Constraints\ChoiceValidator`, this is wrong. Just like for the other use-cass of `Choice` messaging options, it cannot take `{{ label }}` but `{{ choices }}` instead. Commits ------- f599ae4 [Validator] Fix parameters list in Choice::$multipleMessage option
2 parents e0dc6a2 + f599ae4 commit d852a55

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

reference/constraints/Choice.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ Parameter Description
304304
================= ============================================================
305305
``{{ choices }}`` A comma-separated list of available choices
306306
``{{ value }}`` The current (invalid) value
307+
``{{ limit }}`` The maximum number of selectable choices
307308
================= ============================================================
308309

309310
match
@@ -362,6 +363,7 @@ Parameter Description
362363
================= ============================================================
363364
``{{ choices }}`` A comma-separated list of available choices
364365
``{{ value }}`` The current (invalid) value
366+
``{{ limit }}`` The minimum number of selectable choices
365367
================= ============================================================
366368

367369
``multiple``
@@ -385,11 +387,11 @@ is not in the array of valid choices.
385387

386388
You can use the following parameters in this message:
387389

388-
=============== ==============================================================
389-
Parameter Description
390-
=============== ==============================================================
391-
``{{ value }}`` The current (invalid) value
392-
``{{ label }}`` Corresponding form field label
393-
=============== ==============================================================
390+
================= ============================================================
391+
Parameter Description
392+
================= ============================================================
393+
``{{ choices }}`` A comma-separated list of available choices
394+
``{{ value }}`` The current (invalid) value
395+
================= ============================================================
394396

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

0 commit comments

Comments
 (0)