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
Create message error keys and parameters and flatten message keys in Schema of JavaScript Validation Libraries (Zod, Yup, Zoi) support to translate form
#3466
I have created a small library that allows setting message error keys and parameters for the schema. It will then flatten and return a list of error codes.
Currently I have used it to translate error content from submit form, combining nextjs, next-intl and react-hook-form.
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
-
I have created a small library that allows setting message error keys and parameters for the schema. It will then flatten and return a list of error codes.
Currently I have used it to translate error content from submit form, combining nextjs, next-intl and react-hook-form.
Github: https://github.com/nixjs/ts-validator-schema
Flatten message:
Beta Was this translation helpful? Give feedback.
All reactions