You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add validationContext optional prop for and pass it as schema.validateAt(field, values, {context})
Or, more customizable, add validationOptions and pass it as schema.validateAt(field, values, options)
Who does this impact? Who is this for?
It may be useful for checking the entry in the list of values loaded later (e.g., constants or dictionaries). In custom function in when, for example.
custom function for validate prop, but this solution is ugly
@KhodeN Looks like this is still an open issue.. do you recall at all what happened when trying to customize the validate prop that made it ugly? I'm probably going to head in this direction..
🚀 Feature request
Current Behavior
I can use only pure validation schemas (for
validationSchema
prop).Desired Behavior
Ability to pass
context
argument forvalidateAt
function inside Formik.https://github.com/jquense/yup#mixedvalidatevalue-any-options-object-promiseany-validationerror
Suggested Solution
Add
validationContext
optional prop for and pass it asschema.validateAt(field, values, {context})
Or, more customizable, add
validationOptions
and pass it asschema.validateAt(field, values, options)
Who does this impact? Who is this for?
It may be useful for checking the entry in the list of values loaded later (e.g., constants or dictionaries). In custom function in
when
, for example.Or for tuning validation, see https://github.com/jquense/yup#mixedwhenkeys-string--arraystring-builder-object--value-schema-schema-schema example
Describe alternatives you've considered
custom function for
validate
prop, but this solution is uglyThe text was updated successfully, but these errors were encountered: