8000 [Form] Ability to clear form errors · symfony/symfony-docs@d4143f1 · GitHub
[go: up one dir, main page]

Skip to content

Commit d4143f1

Browse files
committed
[Form] Ability to clear form errors
1 parent 3235d06 commit d4143f1

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
@@ -744,6 +744,11 @@ method to access the list of errors. It returns a
744744
// a FormErrorIterator instance representing the form tree structure
745745
$errors = $form->getErrors(true, false);
746746

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>`).
751+
747752
Learn more
748753
----------
749754

0 commit comments

Comments
 (0)
0