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

First validate() call runs validator function twice #94

Closed
mattleonowicz opened this issue Dec 1, 2023 · 2 comments · Fixed by #95
Closed

First validate() call runs validator function twice #94

mattleonowicz opened this issue Dec 1, 2023 · 2 comments · Fixed by #95
Assignees
Labels
bug Something isn't working

Comments

@mattleonowicz
Copy link
Contributor

I have noticed this bug, that first validate() call runs all the validator functions twice.
Here is the simplest minimum reproducible example: https://codesandbox.io/p/sandbox/nice-fast-3vs9wy

I noticed because I started using async validators that call server and noticed double requests in the network.
My use case is that sometimes I need to create a form with initial values and immediately validate it.

@nighca
Copy link
Collaborator

nighca commented Jan 25, 2024

Nice catch!

@nighca nighca self-assigned this Jan 25, 2024
@nighca nighca added the bug Something isn't working label Jan 25, 2024
nighca added a commit to nighca/formstate-x that referenced this issue Jan 25, 2024
@nighca
Copy link
Collaborator

nighca commented Jan 29, 2024

Fixed in v3.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants