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
Uh oh!
There was an error while loading. Please reload this page.
I'm encountering an issue where Zod errors do not update immediately when the user changes the locale. I'm using
sveltekit-i18nlibrary for localization, andzodfor schema validation. I've set up anzodErrorMapto 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 ?!
All reactions