-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add custom error message on nativeEnum validation #3158
add custom error message on nativeEnum validation #3158
Conversation
✅ Deploy Preview for guileless-rolypoly-866f8a ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
404f2c1
to
4e60561
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Nice tests!
4e60561
to
5a45625
Compare
Is there an update on this? |
@scarabcoder i believe they're working on a fix to be released on Zod 4: #3146 (comment) |
My preferred solution here is the one that landed in #3169, which will land in Zod 3.23 shortly. This is all liable to change in Zod 4 as well. |
Resolves #2919
Return
invalid_type_error
on nativeEnum validations instead ofInvalid enum value
when the attribute is set.