zod
https://github.com/colinhacks/zod
TypeScript
TypeScript-first schema validation with static type inference
Triage Issues!
When you volunteer to triage issues, you'll receive an email each day with a link to an open issue that needs help in this project. You'll also receive instructions on how to triage issues.
Triage Docs!
Receive a documented method or class from your favorite GitHub repos in your inbox every day. If you're really pro, receive undocumented methods or classes and supercharge your commit history.
TypeScript not yet supported2 Subscribers
Add a CodeTriage badge to zod
Help out
- Issues
- multipleOf accepts odd integers above ~1e15
- v4: an optional key named after an Object.prototype member refuses an object that lacks it
- z.cidrv6() accepts fractional prefix lengths (e.g. "2001:db8::/64.5")
- bug(v3): ZodObject collects inherited prototype properties in strict() and passthrough()
- v3: `.max()` on arrays and sets doesn't stop parsing (CVE-2023-54404)
- Test suite fails on Windows: esbuild entry paths, attw pack through workspace link, URL test timeout
- Add `z.gtin()` string format with GS1 mod-10 checksum
- Intersection throws "Unmergable intersection" when both sides produce the same NaN
- registry.remove() deletes an id that now belongs to another schema, dropping it from toJSONSchema(registry)
- fromJSONSchema silently drops assertions alongside enum/const, required keys outside properties, and typeless keywords
- Docs
- TypeScript not yet supported