Skip to content

Commit 163ad78

Browse files
peterrehmweaverryan
authored andcommitted
Added hint about the error_bubbling on collections #2559
1 parent 2532f0f commit 163ad78

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

reference/constraints/Valid.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ object and all sub-objects associated with it.
1313
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Type` |
1414
+----------------+---------------------------------------------------------------------+
1515

16+
.. include:: /reference/forms/types/options/_error_bubbling_hint.rst.inc
17+
1618
Basic Usage
1719
-----------
1820

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. tip::
2+
3+
By default the :doc:`collection Field Type </reference/forms/types/collection>` has enabled the option ``error_bubbling``
4+
which passes the errors to the parent form. If you want to attach the errors
5+
to the locations where they actually occure you have to set ``error_bubbling``
6+
to ``false``.

reference/forms/types/options/cascade_validation.rst.inc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,5 @@ the data from ``CategoryType`` to also be validated.
1111
Instead of using this option, you can also use the ``Valid`` constraint in
1212
your model to force validation on a child object stored on a property.
1313

14-
15-
14+
.. include:: /reference/forms/types/options/_error_bubbling_hint.rst.inc
1615

0 commit comments

Comments
 (0)