zod icon indicating copy to clipboard operation
zod copied to clipboard

Add proper plurals to error messages

Open jeremyjacob opened this issue 1 year ago • 1 comments

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.

jeremyjacob avatar Jun 14 '24 06:06 jeremyjacob

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...

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 Jun 14 '24 06:06 netlify[bot]