Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling form.reset() is not resetting errors #111

Open
Hanz-Valta opened this issue Dec 12, 2024 · 2 comments
Open

Calling form.reset() is not resetting errors #111

Hanz-Valta opened this issue Dec 12, 2024 · 2 comments
Assignees

Comments

@Hanz-Valta
Copy link

Hanz-Valta commented Dec 12, 2024

Laravel Precognition Plugin Version

0.5.13

Laravel Version

11.34.2

Plugin

React

Description

calling form.reset() is not resetting the errors and there is no option to reset all errors at once therefore I have to call form.forgetError("fieldName") on every field.

Steps To Reproduce

  1. Fill out form wrongly
  2. Get errors
  3. call form.reset()
  4. The errors will still be visible
@joaopalopes24
Copy link
Contributor

joaopalopes24 commented Dec 13, 2024

Have you tried using form.setErrors({})?

@timacdonald timacdonald self-assigned this Dec 15, 2024
@joaopalopes24
Copy link
Contributor

@Hanz-Valta If you was using with Inertia, have the form.clearErrors() method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants