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

Validation Error Message only after Touched #186

Closed
mikeho opened this issue Mar 31, 2021 · 2 comments · Fixed by #192
Closed

Validation Error Message only after Touched #186

mikeho opened this issue Mar 31, 2021 · 2 comments · Fixed by #192
Labels
good first issue Good for newcomers

Comments

@mikeho
Copy link

mikeho commented Mar 31, 2021

Formik's validation example at https://formik.org/docs/guides/validation shows how they display validation errors per field only after the field itself has been touched, which makes the UI a bit more user-friendly.

I noticed that your library will trigger and display any/all errors immediately after the first onChange.

Can this be updated to be more similar to Formik's recommended approach?

@tgfischer
Copy link
Owner

tgfischer commented Apr 13, 2021

Have you tried setting validateOnChange to false? It defaults to true. The sample in the Storybook link does not use this prop, but could probably be updated to include it so it's a more realistic scenario

https://formik.org/docs/api/formik#validateonchange-boolean

@tgfischer tgfischer added question Further information is requested good first issue Good for newcomers labels Apr 13, 2021
@tgfischer
Copy link
Owner

Just fired up Storybook to add that prop, and I see what you mean. I'll see about addressing this in the next release

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

Successfully merging a pull request may close this issue.

2 participants