Skip to content

Hint Error Bubbling for Collections Edit #3341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions reference/constraints/Valid.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ object and all sub-objects associated with it.
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Type` |
+----------------+---------------------------------------------------------------------+

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

Basic Usage
-----------

Expand Down
6 changes: 6 additions & 0 deletions reference/forms/types/options/_error_bubbling_hint.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. tip::

By default the :doc:`collection Field Type </reference/forms/types/collection>` has enabled the option ``error_bubbling``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has some bad line breaking (not after the 72th character) and 2 spaces after "enabled"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default the ``error_bubbling`` option is enabled for the :doc:`collection Field Type </reference/forms/types/collection>`.

which passes the errors to the parent form. If you want to attach the errors
to the locations where they actually occure you have to set ``error_bubbling``
to ``false``.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the content of the tip should be indented by 4 spaces

3 changes: 1 addition & 2 deletions reference/forms/types/options/cascade_validation.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ the data from ``CategoryType`` to also be validated.
Instead of using this option, you can also use the ``Valid`` constraint in
your model to force validation on a child object stored on a property.



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