You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/form.rst
+10-2Lines changed: 10 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -750,9 +750,17 @@ method to access the list of errors. It returns a
750
750
Clearing Form Errors
751
751
~~~~~~~~~~~~~~~~~~~~
752
752
753
-
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>`).
753
+
.. versionadded:: 4.2
754
+
The ``clearErrors()`` method was introduced in Symfony 4.2.
754
755
755
-
Because clearing the errors makes the form valid, ``clearErrors()`` should only be called after testing whether the form is valid.
0 commit comments