diff --git a/reference/constraints/Valid.rst b/reference/constraints/Valid.rst index 407c5339cbc..5cf5f0283e3 100644 --- a/reference/constraints/Valid.rst +++ b/reference/constraints/Valid.rst @@ -1,6 +1,10 @@ Valid ===== +.. caution:: + + The ``deep`` option is deprecated since Symfony 2.5 and will be removed in Symfony 3.0. + This constraint is used to enable validation on objects that are embedded as properties on an object being validated. This allows you to validate an object and all sub-objects associated with it. @@ -9,9 +13,9 @@ object and all sub-objects associated with it. | Applies to | :ref:`property or method ` | +----------------+---------------------------------------------------------------------+ | Options | - `traverse`_ | -| | - `message`_ | +| | - `deep`_ | +----------------+---------------------------------------------------------------------+ -| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Type` | +| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Valid` | +----------------+---------------------------------------------------------------------+ .. include:: /reference/forms/types/options/_error_bubbling_hint.rst.inc @@ -267,9 +271,11 @@ 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``. -message +deep ~~~~~~~ -**type**: ``string`` **default**: ``This value should be true.`` +**type**: ``boolean`` **default**: ``false`` -This is the message that will be shown if the value is false. +If this constraint is applied to a property that holds an array of objects, +then each object in that array will be validated recursively if this option is set +to ``true``.