From 22a87b5fa09f2dc1aea13e77710271e2fe0715a1 Mon Sep 17 00:00:00 2001 From: Peter Rehm Date: Mon, 20 Oct 2014 22:40:29 +0200 Subject: [PATCH] Added depreciation note for the cascade_validation constraint and updated position of depreciation notes --- reference/forms/types/form.rst | 2 +- .../forms/types/options/cascade_validation.rst.inc | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/reference/forms/types/form.rst b/reference/forms/types/form.rst index 2ccb0debf17..eda6104fc6d 100644 --- a/reference/forms/types/form.rst +++ b/reference/forms/types/form.rst @@ -11,7 +11,7 @@ on all types for which ``form`` is the parent type. | Options | - `action`_ | | | - `allow_extra_fields`_ | | | - `by_reference`_ | -| | - `cascade_validation`_ | +| | - `cascade_validation`_ (deprecated as of 2.8) | | | - `compound`_ | | | - `constraints`_ | | | - `data`_ | diff --git a/reference/forms/types/options/cascade_validation.rst.inc b/reference/forms/types/options/cascade_validation.rst.inc index de75044ba73..2136111fc80 100644 --- a/reference/forms/types/options/cascade_validation.rst.inc +++ b/reference/forms/types/options/cascade_validation.rst.inc @@ -1,6 +1,12 @@ cascade_validation ~~~~~~~~~~~~~~~~~~ +.. caution:: + + The ``cascade_validation`` option has been deprecated in Symfony 2.8 and will be removed + in 3.0. Instead, use the ``Valid`` constraint in your model to cascade validation. Be aware + of the fact that the ``validation_group`` option will not be considered for child forms. + **type**: ``boolean`` **default**: ``false`` Set this option to ``true`` to force validation on embedded form types. @@ -10,11 +16,10 @@ the data from ``CategoryType`` to also be validated. .. tip:: - Instead of using this option, it is recommended that you use the ``Valid`` + Instead of using this option, it is recommended that you use the :doc:`Valid ` constraint in your model to force validation on a child object stored on a property. This cascades only the validation but not the use of - the ``validation_groups`` option on child forms. You can read more - about this in the section about - :ref:`Embedding a Single Object `. + the :ref:`validation_groups ` option on child forms. You can read more + about this in the section about :ref:`Embedding a Single Object `. .. include:: /reference/forms/types/options/_error_bubbling_hint.rst.inc