@@ -14,10 +14,11 @@ and that extra keys are not present.
14
14
+----------------+--------------------------------------------------------------------------+
15
15
| Applies to | :ref: `property or method <validation-property-target >` |
16
16
+----------------+--------------------------------------------------------------------------+
17
- | Options | - `fields `_ |
18
- | | - `allowExtraFields `_ |
19
- | | - `extraFieldsMessage `_ |
17
+ | Options | - `allowExtraFields `_ |
20
18
| | - `allowMissingFields `_ |
19
+ | | - `extraFieldsMessage `_ |
20
+ | | - `fields `_ |
21
+ | | - `groups `_ |
21
22
| | - `missingFieldsMessage `_ |
22
23
| | - `payload `_ |
23
24
+----------------+--------------------------------------------------------------------------+
@@ -289,15 +290,6 @@ the ``NotBlank`` constraint will still be applied (since it is wrapped in
289
290
Options
290
291
-------
291
292
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
-
301
293
allowExtraFields
302
294
~~~~~~~~~~~~~~~~
303
295
@@ -307,6 +299,16 @@ If this option is set to ``false`` and the underlying collection contains
307
299
one or more elements that are not included in the `fields `_ option, a validation
308
300
error will be returned. If set to ``true ``, extra fields are ok.
309
301
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
+
310
312
extraFieldsMessage
311
313
~~~~~~~~~~~~~~~~~~
312
314
@@ -323,15 +325,16 @@ You can use the following parameters in this message:
323
325
| ``{{ field }} `` | The key of the extra field detected |
324
326
+------------------+------------------------------------------------+
325
327
326
- allowMissingFields
327
- ~~~~~~~~~~~~~~~~~~
328
+ fields
329
+ ~~~~~~
328
330
329
- **type **: ``boolean `` ** default **: false
331
+ **type **: ``array `` [ :ref: ` default option < validation-default-option >`]
330
332
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
335
338
336
339
missingFieldsMessage
337
340
~~~~~~~~~~~~~~~~~~~~
0 commit comments