zod icon indicating copy to clipboard operation
zod copied to clipboard

fix: use the custom error message correctly

Open sunnylost opened this issue 1 year ago • 4 comments
trafficstars

fix https://github.com/colinhacks/zod/issues/3675

Error messages provided by the user should have the highest priority, so if they exist, they can be used directly.

sunnylost avatar Aug 28 '24 10:08 sunnylost

Deploy Preview for guileless-rolypoly-866f8a ready!

Built without sensitive environment variables

Name Link
Latest commit 4b94fbc8a9c7ed35dbeeba672147f8e04fbac92a
Latest deploy log https://app.netlify.com/sites/guileless-rolypoly-866f8a/deploys/66cf024412e6d50008e86d63
Deploy Preview https://deploy-preview-3728--guileless-rolypoly-866f8a.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Aug 28 '24 10:08 netlify[bot]

What's the conceptual difference?

StephanMeijer avatar Sep 04 '24 00:09 StephanMeijer

Under this condition if (iss.code !== "invalid_type"), zod won't display user's custom message.

sunnylost avatar Sep 04 '24 04:09 sunnylost

Can you add some tests for this change?

LitoMore avatar Mar 24 '25 16:03 LitoMore