Skip to content

Commit

Permalink
minor #10868 [Validator] Fix @Valid regarding property traverse (…
Browse files Browse the repository at this point in the history
…corphi)

This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Fix `@Valid` regarding property `traverse`

While researching for symfony/symfony#27090, the constraint reference turned out to be incorrect.

Commits
-------

6343b24 Describe actual traversal behaviour
  • Loading branch information
javiereguiluz committed Mar 7, 2019
2 parents 46e650f + 6343b24 commit e68678a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions reference/constraints/Valid.rst
Expand Up @@ -262,9 +262,9 @@ traverse

**type**: ``boolean`` **default**: ``true``

If this constraint is applied to a property that holds an array of objects,
then each object in that array will be validated only if this option is
set to ``true``.
If this constraint is applied to a ``Traversable``, then all containing values
will be validated if this option is set to ``true``. This option is ignored on
arrays: Arrays are traversed in either case. Keys are not validated.

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

Expand Down

0 comments on commit e68678a

Please sign in to comment.