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
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -744,6 +744,11 @@ method to access the list of errors. It returns a
744
744
// a FormErrorIterator instance representing the form tree structure
745
745
$errors = $form->getErrors(true, false);
746
746
747
+
Clearing Form Errors
748
+
~~~~~~~~~~~~~~~~~~~~
749
+
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>`).
0 commit comments