Add option to turn on live validation after initial form submission#63
Open
nicolas-cusan wants to merge 11 commits into
Open
Add option to turn on live validation after initial form submission#63nicolas-cusan wants to merge 11 commits into
nicolas-cusan wants to merge 11 commits into
Conversation
|
Love this, any updates on when can merge? @sha256 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new option:
liveAfterFirstValitationto allow for live validation to kick in after the first full form validation / form submission. More precisely after thevalidatemethod is run with an emptyinputparameter 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
liveAfterFirstValitationistrueas 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