zod
zod copied to clipboard
feature: add attribute message to enum validatiion
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' });
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...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
This has landed in Zod 3.23.
https://github.com/colinhacks/zod/releases/tag/v3.23.0