@@ -5,25 +5,25 @@ This constraint is used to ensure that the given value is one of a given
55set of *valid * choices. It can also be used to validate that each item in
66an array of items is one of those valid choices.
77
8- +----------------+----------------------------------------------------------------------- +
9- | Applies to | :ref: `property or method <validation-property-target >` |
10- +----------------+----------------------------------------------------------------------- +
11- | Options | - `choices `_ |
12- | | - `callback `_ |
13- | | - `multiple `_ |
14- | | - `min `_ |
15- | | - `max `_ |
16- | | - `message `_ |
17- | | - `multipleMessage `_ |
18- | | - `minMessage `_ |
19- | | - `maxMessage `_ |
20- | | - `strict `_ |
21- | | - `payload `_ |
22- +----------------+----------------------------------------------------------------------- +
23- | Class | :class: `Symfony\\ Component\\ Validator\\ Constraints\\ Choice ` |
24- +----------------+----------------------------------------------------------------------- +
25- | Validator | :class: `Symfony\\ Component\\ Validator\\ Constraints\\ ChoiceValidator ` |
26- +----------------+----------------------------------------------------------------------- +
8+ +----------------+----------------------------------------------------------------------+
9+ | Applies to | :ref: `property or method <validation-property-target >` |
10+ +----------------+----------------------------------------------------------------------+
11+ | Options | - `choices `_ |
12+ | | - `callback `_ |
13+ | | - `multiple `_ |
14+ | | - `min `_ |
15+ | | - `max `_ |
16+ | | - `message `_ |
17+ | | - `multipleMessage `_ |
18+ | | - `minMessage `_ |
19+ | | - `maxMessage `_ |
20+ | | - `strict `_ |
21+ | | - `payload `_ |
22+ +----------------+----------------------------------------------------------------------+
23+ | Class | :class: `Symfony\\ Component\\ Validator\\ Constraints\\ Choice ` |
24+ +----------------+----------------------------------------------------------------------+
25+ | Validator | :class: `Symfony\\ Component\\ Validator\\ Constraints\\ ChoiceValidator ` |
26+ +----------------+----------------------------------------------------------------------+
2727
2828Basic Usage
2929-----------
@@ -276,8 +276,8 @@ callback
276276**type **: ``string|array|Closure ``
277277
278278This is a callback method that can be used instead of the `choices `_ option
279- to return the choices array. See ` Supplying the Choices with a Callback Function `_
280- for details on its usage.
279+ to return the choices array. See
280+ ` Supplying the Choices with a Callback Function `_ for details on its usage.
281281
282282multiple
283283~~~~~~~~
@@ -314,16 +314,17 @@ message
314314
315315**type **: ``string `` **default **: ``The value you selected is not a valid choice. ``
316316
317- This is the message that you will receive if the ``multiple `` option is set
318- to ``false ``, and the underlying value is not in the valid array of choices.
317+ This is the message that you will receive if the ``multiple `` option is
318+ set to ``false `` and the underlying value is not in the valid array of
319+ choices.
319320
320321multipleMessage
321322~~~~~~~~~~~~~~~
322323
323324**type **: ``string `` **default **: ``One or more of the given values is invalid. ``
324325
325- This is the message that you will receive if the ``multiple `` option is set
326- to ``true ``, and one of the values on the underlying array being checked
326+ This is the message that you will receive if the ``multiple `` option is
327+ set to ``true `` and one of the values on the underlying array being checked
327328is not in the array of valid choices.
328329
329330minMessage
@@ -348,7 +349,7 @@ strict
348349**type **: ``Boolean `` **default **: ``false ``
349350
350351If true, the validator will also check the type of the input value. Specifically,
351- this value is passed to as the third argument to the PHP :phpfunction: `in_array ` method
352- when checking to see if a value is in the valid choices array.
352+ this value is passed to as the third argument to the PHP :phpfunction: `in_array `
353+ method when checking to see if a value is in the valid choices array.
353354
354355.. include :: /reference/constraints/_payload-option.rst.inc
0 commit comments