zod icon indicating copy to clipboard operation
zod copied to clipboard

feature: add attribute message to enum validatiion

Open fernandollisboa opened this issue 1 year ago • 1 comments

Resolves #3146

Make it possible to call enum validation with a custom message using message attribute:

  z.enum(['aaa', 'bbb', 'ccc'], { message: 'custom error message' });

fernandollisboa avatar Jan 22 '24 14:01 fernandollisboa

Deploy Preview for guileless-rolypoly-866f8a ready!

Built without sensitive environment variables

Name Link
Latest commit 1e29cea6580eed1c35e983fdd1978ccbc8bb91ab
Latest deploy log https://app.netlify.com/sites/guileless-rolypoly-866f8a/deploys/65d443bf97921c0008ca5f4b
Deploy Preview https://deploy-preview-3169--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 Jan 22 '24 14:01 netlify[bot]

This has landed in Zod 3.23.

https://github.com/colinhacks/zod/releases/tag/v3.23.0

colinhacks avatar Apr 21 '24 22:04 colinhacks