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

Add option to turn on live validation after initial form submission #63

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

nicolas-cusan
Copy link

This PR adds a new option: liveAfterFirstValitation to allow for live validation to kick in after the first full form validation / form submission. More precisely after the validate method is run with an empty input parameter for the first time.

The background is that with the previous implementation the user gets "screamed" at immediately with an error when he starts typing an email address. This is not a nice UX as the user did not even have a chance give a correct address yet.

The implementation is not very refined (I realize that) but works. Right now the the default value of liveAfterFirstValitation is true as stated above IMO this is the best form validation behaviour form a UX point of view. Feel free to change if you like.

See the main changes here: https://github.com/sha256/Pristine/compare/master...nicolas-cusan:master?expand=1#diff-d1ac7f371ab74e23ae96a1ab066349246e59aed45838ec14cd616f1249d2c5e4

Thank you for considering the PR

@weilinzung
Copy link

Love this, any updates on when can merge? @sha256

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

Successfully merging this pull request may close these issues.

2 participants