Skip to content

Commit

Permalink
describe how to access form errors
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Nov 1, 2014
1 parent de286e2 commit 4221db8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions components/form/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,13 @@ object::
errors from that field. However, there is no way to determine which field
an error was originally attached to.

.. note::

Unless you enable the :ref:`error_bubbling <reference-form-option-error-bubbling>`
option on a particular child form, ``getErrors()`` only returns the errors
of the form it is accessed on. For debugging purposes, you can use the :method:`Symfony\\Component\\Form\\Form::getErrorsAsString` method which
returns a string representation of all errors of the whole form tree.

.. _Packagist: https://packagist.org/packages/symfony/form
.. _Twig: http://twig.sensiolabs.org
.. _`Twig Configuration`: http://twig.sensiolabs.org/doc/intro.html

0 comments on commit 4221db8

Please sign in to comment.