Skip to content

Commit

Permalink
Added depreciation note for the cascade_validation constraint and upd…
Browse files Browse the repository at this point in the history
…ated position of depreciation notes
  • Loading branch information
peterrehm authored and weaverryan committed Jun 19, 2015
1 parent 59569c0 commit 22a87b5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion reference/forms/types/form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`_ |
Expand Down
13 changes: 9 additions & 4 deletions reference/forms/types/options/cascade_validation.rst.inc
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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 </reference/constraints/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 <forms-embedding-single-object>`.
the :ref:`validation_groups <book-forms-validation-groups>` option on child forms. You can read more
about this in the section about :ref:`Embedding a Single Object <forms-embedding-single-object>`.

.. include:: /reference/forms/types/options/_error_bubbling_hint.rst.inc

0 comments on commit 22a87b5

Please sign in to comment.