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
- z.compile: generate the parser at first parse, as zod/compile global mode does
- v4.6: object with a bare z.any()/z.unknown() field rejects input that omits the key (regression from 4.3)
- Reduce npm package size: test files and fixtures and TypeScript sources next to the compiled JS ship in the tarball (~3.1 MB of 6.1 MB)
- prettifyError drops an empty-string key from the path
- Feature request: support JSON Schema `uri-reference` format (relative URLs)
- fromJSONSchema silently ignores $dynamicRef instead of rejecting unsupported recursive validation
- Exclude tests from published package
- Type `$ZodIssueInvalidStringFormat` should include a `origin` field
- Flatten nested unions in `toJSONSchema`
- Recursive types with `z.lazy` (with solution)
- Docs
- TypeScript not yet supported