colinhacks / zod

TypeScript-first schema validation with static type inference
https://zod.dev
MIT License
32.99k stars 1.14k forks source link

Support for KSUIDs #3050

Open stefanlogue opened 9 months ago

stefanlogue commented 9 months ago

We've already got validators for other types of UID (UUID, ULID, CUID etc.), so rather than having to use a regex when working with KSUIDs, it would be nice if we had the same experience:

const ksuid = z.string().ksuid()
rixrix commented 6 months ago

hey team, what's holding on with the PR ? I thought it's useful and I have use-case where I needed to validate a KSUID data from an API call.