zod

TypeScript-first schema validation with static type inference

19 articles 41.9k View on GitHub ↗
19 articles
How to Validate Map and Set Collections with Zod: Complete Guide

Master Zod map and set validation. Learn to validate Map and Set collections with key/value schemas, size constraints, and async refinements for robust data handling. Get the complete guide.

how-to-guide
Feb 23, 2026
How to Use Zod's Record for Key-Value Validation: Syntax, Examples, and Source Code

Master Zod's record for key-value validation. Learn syntax and see examples to ensure your dictionary objects meet specific key and value schema requirements. Read now.

how-to-guide
Feb 23, 2026
How to Use Zod's Lazy for Self-Referential Schemas

Learn to use Zod's lazy for self-referential schemas. Defer evaluation of circular types with z.lazy to prevent ReferenceError and maintain TypeScript inference for recursive data.

how-to-guide
Feb 23, 2026
How to Use Zod Union and Enum Types: A Complete Guide

Master Zod union and enum types to validate against multiple shapes or literal values. Get runtime validation and full TypeScript inference with this complete guide.

how-to-guide
Feb 23, 2026
How to Combine Schemas with Zod's Intersection

Discover how to combine schemas with Zod's intersection combinator. Learn to merge validators for simultaneous input satisfaction and a compile-time TypeScript intersection type, enhancing your data validation.

how-to-guide
Feb 23, 2026
How to Define Recursive Types in Zod: A Complete Guide to z.lazy

Master recursive types in Zod with z.lazy Learn to define self-referencing schemas and break circular dependencies for robust data validation in your TypeScript projects

how-to-guide
Feb 23, 2026
How to Use Zod's pick and omit for Partial Object Types: A Complete Guide

Master Zod pick and omit to create partial object types. Select or exclude keys from Zod schemas for precise data shaping and type safety in your JavaScript projects.

how-to-guide
Feb 23, 2026
How to Use Zod's Mask Method for Partial Field Handling

Master Zod's mask method to selectively handle partial fields. Learn how to update specific schema fields using truthy masks for efficient data validation.

how-to-guide
Feb 23, 2026
How to Use Zod's Catch Method for Default Values on Parse Failures

Learn how to use Zod's catch method to provide default values on parse failures, preventing errors and ensuring valid data in your application. Simplify data handling with Zod.

how-to-guide
Feb 23, 2026
How to Use Zod Pipeline Transform for Chained Schema Validation

Discover how to use Zod pipeline transform for chained schema validation. Compose schemas for type-safe transformations with automatic error short-circuiting. Learn more now.

tutorial
Feb 23, 2026
How to Implement Discriminated Unions in Zod: A Complete Guide

Learn how to implement discriminated unions in Zod with z.discriminatedUnion. Achieve O(1) lookup and precise errors for robust data validation.

how-to-guide
Feb 23, 2026
How to Use Zod's preprocess for Pre-Parsing Data Transformation

Learn how to use Zod preprocess for data transformation before validation. Transform, sanitize, and coerce data effectively with Zod pipes for robust error handling.

how-to-guide
Feb 23, 2026

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →