zod icon indicating copy to clipboard operation
zod copied to clipboard

feat: support numberic string

Open UNDERCOVERj opened this issue 2 years ago • 3 comments

I want to express number string。just use z.string().numeric() to replace z.string().regex(/^[0-9]*$/)

https://github.com/colinhacks/zod/issues/1240

UNDERCOVERj avatar Jul 18 '22 06:07 UNDERCOVERj

Deploy Preview for guileless-rolypoly-866f8a ready!

Built without sensitive environment variables

Name Link
Latest commit 5844f33189f3cda7dc358b51f6c9c8f931469d4d
Latest deploy log https://app.netlify.com/sites/guileless-rolypoly-866f8a/deploys/62d611ad45e0860008d87cd7
Deploy Preview https://deploy-preview-1266--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 settings.

netlify[bot] avatar Jul 18 '22 06:07 netlify[bot]

what about negative and float numbers?

RobinTail avatar Aug 07 '22 10:08 RobinTail

what about negative and float numbers?

I think you are right,I think there should have a way for users to provide custom validators for ZodString

UNDERCOVERj avatar Aug 07 '22 14:08 UNDERCOVERj

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 06 '22 16:10 stale[bot]