Closed foxhound87 closed 7 years ago
What about checkAsync
?
Is it already available? I don't see it documented
That's working. Thank You.
@foxhound87, Please can you share how did you overcome this problem using checkAsync
. Any type of help is appreciated.
@raghavgarg1257 take a look at this commit:
https://github.com/foxhound87/mobx-react-form/commit/b74be11f3d16af53870a55a9e5a26654dbff4b36
@foxhound87 Thanks, for the reply.
@foxhound87 Can you write a real example here? I have this issue and can't figure out how to resolve.
I call both .passes() and .fails() to check the async validation. Right now I don't find any solution to check both validation states without calling both of them. This runs the validation twice.
I think we need a method which runs the async function only one time and calls respectively passes/fails callbacks. Or at least a promise implementation (as I proposed in this issue: https://github.com/skaterdav85/validatorjs/issues/127)
For example a possible solution could be to provide a validation function which accept an object with the two callbacks:
We discussed the problem in this issue: https://github.com/foxhound87/mobx-react-form/issues/214
Thank You.