Zod Errors not Updating Immediately on Locale Change #124
Unanswered
mehdikhody
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm encountering an issue where Zod errors do not update immediately when the user changes the locale. I'm using
sveltekit-i18n
library for localization, andzod
for schema validation. I've set up anzodErrorMap
to handle the translation of Zod errors to the current user locale. The translation works fine, but when the user changes the locale, the Zod errors do not update until another error is triggered.I want that to be consistently translated into the selected language without the need for an additional error trigger.
Below is the code snippet:
Should I make any adjustments ?!
Beta Was this translation helpful? Give feedback.
All reactions