Merging sync and async validation? #488
-
I don't know the motivation behind it but I wonder if we actually need to separate sync and async validation? For example, instead of having onChange and onChangeAsync, it could be simpler if we just had onChange that would accept a function that either returns a promise (async) or directly a validation error (sync)? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
They’re separate so we can perform denouncing on one, but not the other. If you mix them, your execution control between the two is gone. |
Beta Was this translation helpful? Give feedback.
-
Makes sense, thank you Tanner! |
Beta Was this translation helpful? Give feedback.
They’re separate so we can perform denouncing on one, but not the other. If you mix them, your execution control between the two is gone.