- Parse data with a pre-defined schema
- TypeScript-first
- Validate: check if data is valid
- Parse: check if data is valid and return the parsed data
- TypeScript: Static type checking
- Zod: Parse at runtime
- Parse form data before sending to the server
- Parse data before sending back out to the client
- Parse data at the API boundary before sending to the database
- Parse data in functions around your application
- Parse data from an external data source
- Defining a schema
- Parsing data with a schema
- Infer TypeScript types from a schema
- Custom error messages
- Different data types (object, array, string, number, boolean, etc.)
- parse
- safeParse
- strict
- passThrough
- Validate one field against another
- parseAsync
- Zod enums
- Native enums