Skip to content
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

fix(validator-zod): Surface nested errors when validating a union type #294

Merged
merged 5 commits into from
Nov 1, 2024

Conversation

sea-grass
Copy link
Contributor

Closes #248, #290.

Fixes the Zod validator to surface nested invalid_union errors.

For existing users of @felte/validator-zod, validation behaviour is the same. The only difference is that Zod issues with an invalid_union code will now be recursively crawled for their nested issues. Validation works exactly the same, but usage of a union type may now show errors where they weren't shown before.

Copy link

vercel bot commented May 20, 2024

@sea-grass is attempting to deploy a commit to the Pablo Alejandro Berganza Campos' projects Team on Vercel.

A member of the Team first needs to authorize it.

@sea-grass sea-grass force-pushed the zod-support-union-types branch from 288dbd7 to 96f924b Compare May 20, 2024 05:16
pablo-abc
pablo-abc previously approved these changes Oct 29, 2024
@sea-grass sea-grass force-pushed the zod-support-union-types branch from aa11148 to f1c9bfe Compare October 31, 2024 14:37
@sea-grass
Copy link
Contributor Author

Hey @pablo-abc, thanks for the review. I saw you'd made some updates to the main branch, so I merged the latest changes. It should be fully up-to-date now. Seems like the PR just needs authorization to run the CI pipeline on Vercel to pass the checks.

Copy link

vercel bot commented Oct 31, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
felte-docs-ykvc ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 31, 2024 2:42pm

@pablo-abc pablo-abc merged commit 5d90c05 into pablo-abc:main Nov 1, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with Conditional Validation in Form Schema Using zod
2 participants