Skip to content

Commit 75c5949

Browse files
colinodellLiinkiing
authored andcommitted
[Form] Ability to clear form errors
1 parent 2ddcf3e commit 75c5949

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

components/form.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,11 @@ method to access the list of errors. It returns a
747747
// a FormErrorIterator instance representing the form tree structure
748748
$errors = $form->getErrors(true, false);
749749

750+
Clearing Form Errors
751+
~~~~~~~~~~~~~~~~~~~~
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>`).
754+
750755
Learn more
751756
----------
752757

0 commit comments

Comments
 (0)