Zod · Method
z.undefined
Zod is a TypeScript-first library for validating data at runtime. You define schemas for values such as strings, numbers, objects, and arrays, then parse untrusted input to get validated data.
Last updated
Syntax
const Schema = z.object({ field: z.string() });
const data = Schema.parse(input);In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
z.objectz.stringz.numberz.coercez.optionalz.nullablez.unionz.infer