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
Hello 👋
I am currently using Formik with Yup for validation and I want to add i18n to error messages.
Yup has support for i18n as explained in this section.
The problem with this approach is that Formik expects the validation function to return a String (or undefined) but this way Yup will be returning an Object instead of String.
Do you guys have a better idea? I don't want to have //@ts-ignore everywhere on my code 😅
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello 👋
I am currently using Formik with Yup for validation and I want to add i18n to error messages.
Yup has support for i18n as explained in this section.
The problem with this approach is that Formik expects the validation function to return a String (or undefined) but this way Yup will be returning an Object instead of String.
Do you guys have a better idea? I don't want to have
//@ts-ignore
everywhere on my code 😅Beta Was this translation helpful? Give feedback.
All reactions