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 2 commits
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 ``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.

Wrap lines after the first word that crosses the 72nd character. Thus, the entire tip would look like this:

.. tip::

    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
Contributor Author

Choose a reason for hiding this comment

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

Even when it is just a link? I took care not to be longer than 72 characters excluding the meta information.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, the line length is not meaned for rendering, Sphinx just removes all line feeds from a file. It's meaned to be easier to read when reading the source code and reviewing patches.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, this is mainly related to horizontal scrollbars in editors. And those are there regardless if it is meta information or "real" text. :)

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