8000 Clarify that clearing errors makes the form valid · symfony/symfony-docs@7a4465d · GitHub
[go: up one dir, main page]

Skip to content

Commit 7a4465d

Browse files
committed
Clarify that clearing errors makes the form valid
1 parent d4143f1 commit 7a4465d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

components/form.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,8 @@ Clearing Form Errors
749749

750750
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>`).
751751

752+
Because clearing the errors makes the form valid, ``clearErrors()`` should only be called after testing whether the form is valid.
753+
752754
Learn more
753755
----------
754756

0 commit comments

Comments
 (0)
0