Skip to content

Commit f07f536

Browse files
Wrap long lines and add the versionadded directive
1 parent 7a4465d commit f07f536

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

components/form.rst

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -747,9 +747,17 @@ method to access the list of errors. It returns a
747747
Clearing Form Errors
748748
~~~~~~~~~~~~~~~~~~~~
749749

750-
Any errors can be manually cleared using the :method:`Symfony\\Component\\Form\\ClearableErrorsInterface::clearErrors` method. This is useful when you'd like to validate the form without showing validation errors to the user (i.e. during a partial AJAX submission or :doc:`dynamic form modification </form/dynamic_form_modification>`).
750+
.. versionadded:: 4.2
751+
The ``clearErrors()`` method was introduced in Symfony 4.2.
751752

752-
Because clearing the errors makes the form valid, ``clearErrors()`` should only be called after testing whether the form is valid.
753+
Any errors can be manually cleared using the
754+
:method:`Symfony\\Component\\Form\\ClearableErrorsInterface::clearErrors`
755+
method. This is useful when you'd like to validate the form without showing
756+
validation errors to the user (i.e. during a partial AJAX submission or
757+
:doc:`dynamic form modification </form/dynamic_form_modification>`).
758+
759+
Because clearing the errors makes the form valid, ``clearErrors()`` should only
760+
be called after testing whether the form is valid.
753761

754762
Learn more
755763
----------

0 commit comments

Comments
 (0)