zod
zod copied to clipboard
Add proper plurals to error messages
A bit of low-cost polish to determine if the plural or singular of phrases in error messages should be used. Replaces (s).
Before
Must be 5 or fewer character(s) long
Array must contain at most 1 element(s)
Unrecognized key(s) in object: 'extra'
After
Must be 5 or fewer characters long
Array must contain at most 1 element
Unrecognized key in object: 'extra'
Especially given that these errors or derivatives of them are often returned by APIs or shown in forms, this small change could make a positive impact on end user UX.
Deploy Preview for guileless-rolypoly-866f8a ready!
Built without sensitive environment variables
| Name | Link |
|---|---|
| Latest commit | 70451c127c2172a4caccc729656b21238aa876c4 |
| Latest deploy log | https://app.netlify.com/sites/guileless-rolypoly-866f8a/deploys/666be4fcabee1c00080a3dae |
| Deploy Preview | https://deploy-preview-3572--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.