Skip to content

Commit 20eb6c7

Browse files
committed
minor #17043 [Validator] Document the match option of Choice constraint (javiereguiluz)
This PR was squashed before being merged into the 6.2 branch. Discussion ---------- [Validator] Document the match option of Choice constraint Fixes #17025. Commits ------- 36f1d83 [Validator] Document the match option of Choice constraint
2 parents e03b442 + 36f1d83 commit 20eb6c7

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

reference/forms/types/choice.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,19 @@ correct types will be assigned to the model.
195195

196196
.. include:: /reference/forms/types/options/group_by.rst.inc
197197

198+
match
199+
~~~~~
200+
201+
**type**: ``boolean`` **default**: ``true``
202+
203+
When this option is ``false``, the constraint checks that the given value is
204+
not one of the values defined in the ``choices`` option. In practice, it makes
205+
the ``Choice`` constraint behave like a ``NotChoice`` constraint.
206+
207+
.. versionadded:: 6.2
208+
209+
The ``match`` option was introduced in Symfony 6.2.
210+
198211
.. include:: /reference/forms/types/options/multiple.rst.inc
199212

200213
.. include:: /reference/forms/types/options/placeholder.rst.inc

0 commit comments

Comments
 (0)