-
Notifications
You must be signed in to change notification settings - Fork 20
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
Do not validate immediately #97
Comments
I believe the intent is still to be as close as we can to a drop-in replacement, so aligning our default with the old library seems reasonable. I can't think of any reason we wouldn't always want to capture fields' initial value so we can defer validation until that value has changed. We'd still always validate on submit, of course.
You can specify aspnet-client-validation/src/index.ts Lines 1042 to 1049 in 2c76d35
We can take a closer look at how the old library can be customized, but in the short term we could pretty easily support bootstrapping with Thoughts? |
Thanks!
Yes I did something similar - I saved the initial value to a data attribute, e.g.
I was able to delete so many kludges and workarounds because of that feature. Thanks! I've lodged a docs PR to expose it.
Although that would be nice, but But deferring validating until the field is actually dirty would be a good addition. Without that, some ugly workarounds are still necessary. I haven't written TypeScript in years, so I can't help there, but maybe someone will stumble on this issue for the same reason and help out. Just ping me to get involved and help with testing / documenting, etc. |
Was this addressed in #110? |
I don't think so |
In the original jQuery plugin it was possible to control when validation was activated. By default it would occur on each field's blur (demo).
This library performs validation immediately, i.e. as soon as the user starts typing in a field. That is not standard validation behaviour and leads to poor UX - the user is distracted by validation errors even before submitting the form.
Repro: I wanted to ensure it's not "just me", so:
I can identify these modes of activation:
Is any of this currently possible?
The text was updated successfully, but these errors were encountered: