Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4221db8

Browse filesBrowse files
committed
describe how to access form errors
1 parent de286e2 commit 4221db8
Copy full SHA for 4221db8

File tree

Expand file treeCollapse file tree

1 file changed

+7
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-0
lines changed

‎components/form/introduction.rst

Copy file name to clipboardExpand all lines: components/form/introduction.rst
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,13 @@ object::
687687
errors from that field. However, there is no way to determine which field
688688
an error was originally attached to.
689689

690+
.. note::
691+
692+
Unless you enable the :ref:`error_bubbling <reference-form-option-error-bubbling>`
693+
option on a particular child form, ``getErrors()`` only returns the errors
694+
of the form it is accessed on. For debugging purposes, you can use the :method:`Symfony\\Component\\Form\\Form::getErrorsAsString` method which
695+
returns a string representation of all errors of the whole form tree.
696+
690697
.. _Packagist: https://packagist.org/packages/symfony/form
691698
.. _Twig: http://twig.sensiolabs.org
692699
.. _`Twig Configuration`: http://twig.sensiolabs.org/doc/intro.html

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.