Closed enagy27 closed 3 years ago
I do not think this should be baked into Formik. I do however, think it would be great to move Formik.validationSchema to a package like formik-yup
, and that package could create a custom <YupField
which binds this functionality to Formik's Field.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 60 days
🚀 Feature request
Add the ability to use
validationSchema
as a prop for<Field />
anduseField()
. This would make some forms of conditional validation easier, such as when a piece of a form is visible only if a previous option was selected. This ties validations to currently rendered content, which can be helpful sometimes.Current Behavior
At the field level I'm able to add a custom
validationSchema
through thevalidate
callback, but I'm curious if this should be baked into formik 🤔Desired Behavior