resolvers icon indicating copy to clipboard operation
resolvers copied to clipboard

fix: discriminated union for Zod v4 mini

Open eliocapella opened this issue 5 months ago • 1 comments

Context

When trying out the new Zod v4 mini I noticed that discriminated unions aren't supported.

Changes

  • Adding discriminated unions to the tests
  • Using the current error on invalid union if the errors array is empty

eliocapella avatar Jun 19 '25 08:06 eliocapella

I'm unable to get bun to work correctly in my computer, it just keeps loading forever when trying to run the tests Screenshot 2025-06-19 at 10 20 06

eliocapella avatar Jun 19 '25 08:06 eliocapella

Hey, any plans to release this fix?

lefuncq avatar Jun 27 '25 15:06 lefuncq

As this likely fixes https://github.com/react-hook-form/resolvers/issues/793, I'd also love a release that includes this change 😍

cascornelissen avatar Jul 27 '25 20:07 cascornelissen

:tada: This PR is included in version 5.2.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Jul 29 '25 13:07 github-actions[bot]