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 do i run validation on blur #42

Closed
mnksingh1996 opened this issue Jan 21, 2019 · 6 comments
Closed

How do i run validation on blur #42

mnksingh1996 opened this issue Jan 21, 2019 · 6 comments

Comments

@mnksingh1996
Copy link

Right now i can only trigger validation on start or on submit with this.validator.showMessages() but my form is really long and i want to trigger it on blur, please explain how can i do it or extend the current library.

@stuyam
Copy link
Collaborator

stuyam commented Jan 22, 2019

A few people have asked for this, Im not sure if there is way currently that this is possible.

I think we could add a validator method that could be called with the key you want to show individual messages. The idea being you could put that in an onBlur react handler and show an individual validation message one at a time.

I really like this idea and we should go forward on developing this feature 👍

@neilmaledev
Copy link

Up. I'm looking forward for it too.

@Jebble
Copy link

Jebble commented Mar 7, 2019

Up!

The only thing I'm missing is real time validation before submission to instantly let people know a field was required or doesn't match without having to submit and seeing all the errors at once.

@ej2015 ej2015 mentioned this issue May 29, 2019
@millturnK
Copy link

Ditto! Love your work, you've saved me so much time. Excellent coding :-).

@stuyam
Copy link
Collaborator

stuyam commented May 31, 2019

Featured added in #92 and coming to v1.1.0

@stuyam
Copy link
Collaborator

stuyam commented May 31, 2019

Out in latest release: 1.1.0

@stuyam stuyam closed this as completed May 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants