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

How to avoid validation on initialization. #52

Closed
zgayjjf opened this issue Dec 25, 2017 · 2 comments
Closed

How to avoid validation on initialization. #52

zgayjjf opened this issue Dec 25, 2017 · 2 comments
Labels

Comments

@zgayjjf
Copy link

zgayjjf commented Dec 25, 2017

I hava a form with validationErrors validations props. However, the error message will display when form is mounted, before users' input.
How can i run validation only on users input, not on initialization.

I notice that validations will be run in two place on initialization:

  1. When Formsy mounted.
  2. Every time a field is attacted to Formsy.

https://github.com/formsy/formsy-react/blob/master/src/index.js#L210

https://github.com/formsy/formsy-react/blob/master/src/index.js#L35

Could there be a config to solve this problem?

@rkuykendall
Copy link
Member

I would check out the showError() prop. You can see a snippet of some of my input code, as well as a link to a great repo, here.

@MilosRasic
Copy link
Contributor

Inactive and resolved. Closing.

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

No branches or pull requests

3 participants