Revalidate without submit
Good afternoon guys, how are you?
I have a scenario where I need to revalidate some fields, but I don't want to change the meta.touched to true.
Is there any way to trigger the validation of all fields in a practical way?
Thanks!
I also needed to trigger validation and found out, that there is not such public API. Luckily, there is a workaround. The (somewhat less known) Mutator API runs validation practically with everything (see the source code for mutators, where it calls runValidate with undefined which runs validate on all registered fields).
I link CodeSandbox with an example of such mutator in this comment.
HI, @czabaj problem is your example is only one field it works fine when you add multiple fields then if (meta.active) return undefined; meta. active always false then very keypress it will call async servcie