@@ -14,10 +14,11 @@ and that extra keys are not present.
1414+----------------+--------------------------------------------------------------------------+
1515| Applies to | :ref: `property or method <validation-property-target >` |
1616+----------------+--------------------------------------------------------------------------+
17- | Options | - `fields `_ |
18- | | - `allowExtraFields `_ |
19- | | - `extraFieldsMessage `_ |
17+ | Options | - `allowExtraFields `_ |
2018| | - `allowMissingFields `_ |
19+ | | - `extraFieldsMessage `_ |
20+ | | - `fields `_ |
21+ | | - `groups `_ |
2122| | - `missingFieldsMessage `_ |
2223| | - `payload `_ |
2324+----------------+--------------------------------------------------------------------------+
@@ -289,15 +290,6 @@ the ``NotBlank`` constraint will still be applied (since it is wrapped in
289290Options
290291-------
291292
292- fields
293- ~~~~~~
294-
295- **type **: ``array `` [:ref: `default option <validation-default-option >`]
296-
297- This option is required and is an associative array defining all of the
298- keys in the collection and, for each key, exactly which validator(s) should
299- be executed against that element of the collection.
300-
301293allowExtraFields
302294~~~~~~~~~~~~~~~~
303295
@@ -307,6 +299,16 @@ If this option is set to ``false`` and the underlying collection contains
307299one or more elements that are not included in the `fields `_ option, a validation
308300error will be returned. If set to ``true ``, extra fields are ok.
309301
302+ allowMissingFields
303+ ~~~~~~~~~~~~~~~~~~
304+
305+ **type **: ``boolean `` **default **: false
306+
307+ If this option is set to ``false `` and one or more fields from the `fields `_
308+ option are not present in the underlying collection, a validation error
309+ will be returned. If set to ``true ``, it's ok if some fields in the `fields `_
310+ option are not present in the underlying collection.
311+
310312extraFieldsMessage
311313~~~~~~~~~~~~~~~~~~
312314
@@ -323,15 +325,16 @@ You can use the following parameters in this message:
323325| ``{{ field }} `` | The key of the extra field detected |
324326+------------------+------------------------------------------------+
325327
326- allowMissingFields
327- ~~~~~~~~~~~~~~~~~~
328+ fields
329+ ~~~~~~
328330
329- **type **: ``boolean `` ** default **: false
331+ **type **: ``array `` [ :ref: ` default option < validation-default-option >`]
330332
331- If this option is set to ``false `` and one or more fields from the `fields `_
332- option are not present in the underlying collection, a validation error
333- will be returned. If set to ``true ``, it's ok if some fields in the `fields `_
334- option are not present in the underlying collection.
333+ This option is required and is an associative array defining all of the
334+ keys in the collection and, for each key, exactly which validator(s) should
335+ be executed against that element of the collection.
336+
337+ .. include :: /reference/constraints/_groups-option.rst.inc
335338
336339missingFieldsMessage
337340~~~~~~~~~~~~~~~~~~~~
0 commit comments