-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
debounce option #41
Comments
Use an async validator and debounce that? |
would that work? any sample code? |
We'd need to flesh out some more what, exactly, would be useful. Presumably, debouncing would only be useful for async validation, as sync validation tends to be fast enough to be done in realtime on every keypress. The other option is to debounce the I was going to code up an example, but my intuition told me to stop and just look on npm. Of course there's a library that will debounce any function already! Try wrapping your |
my use case is having unobtrusive validations. Where you only validate the fields on change after the first click on submit. Another approach is making a debounce option basically validate after say 500ms delay. |
It sort of already does that out of the box, where it won't show the validation error until the field is "touched", so if you use the |
thank you! @erikras |
Hey @erikras, thanks for the amazing work. I'm developing on a mid 2012 Macbook Air and I can tell you that even without being a fast typist, having the validation function running at every key press makes the form almost unusable (node local server is eating 50% of my CPU power on top of that). Note that I don't have I would really love to be able to use I'm already using Thanks in advance. |
@erikras Sorry, for asking something you already answered. |
@erikras Actually I made it work by using lodash |
@fedorinoGore same issue with debounce, did you get it working? |
Hey! Has it been resolved somehow? |
@thisguychris this seems to be still issue, you closed it long ago tho. I do not see any solution/recommendation suggested. Could you or @erikras take a moment to reconsider its status or provide some alternatives. Thanks! |
@chetangautam I'm using |
Is there an option for debouncing validation?
The text was updated successfully, but these errors were encountered: