Closed wwwebman closed 6 years ago
If you want to validate one path you can use schema.validateIn
or use reach()
to get the schema you wanna and call validate on that
Looks like plan, thanks.
I am also wounder about schema.validateAt
which is do the same, I guess :) ?
There is a reason why schema.validateIn
is not documented?
I meant validateAt sorry, typo :P
Is it possible get specific field error? Not first, not all, but specific? For example, I have next schema:
I want to get error related to
email
filed.I know I can do it by adding
{ abortEarly: false }
and looking for some pathinner[0].path
... But this approach has big disadvantage - re-call validation method on each blur/change event. So, maybe, it is not so painful in case of sync validation, but in case of API calls usingyup.test
it can be kick in the a**.Looks like Formik has problem with it too: https://github.com/jaredpalmer/formik/issues/512
So, is there any ways to get specific error or plans to add such feature in the future?