Skip to content

Conversation

@paradis-f
Copy link
Contributor

@paradis-f paradis-f commented Oct 1, 2025

Fixes #787

Solution proposed by https://github.com/Tekpakma in the issue works well. Error paths are now properly returned for unions in the zod resolver.

Also fixes type errors, there was unnecessary type assertions for errors when success is returned. (See previous commits failed builds)

Thanks for your consideration :)

@paradis-f paradis-f closed this Oct 1, 2025
@paradis-f paradis-f reopened this Oct 1, 2025
@paradis-f paradis-f changed the title Fix: error paths in complex unions #787 Fix (zod) : error paths in complex unions #787 Oct 1, 2025
@MatthieuJnon
Copy link

@jorisre Could you have a look at this please ? thank you :)

@jorisre jorisre merged commit 2e9bc7c into react-hook-form:master Nov 6, 2025
4 checks passed
@jorisre
Copy link
Member

jorisre commented Nov 6, 2025

@bluebill1049 The publish failed because of Node.js version requirements, as you can see in the GitHub Actions on master. Could you take a look? I can’t from the GitHub app, and I don’t have a computer right now. Thanks a lot!

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: [zod] Wrong Error Path for complex Unions

3 participants