Zod ยท Function
z.object
z.object() defines a schema for an object. Each property gets its own Zod schema, and parsing checks the complete value.
Last updated
Syntax
z.object({ fieldName: fieldSchema })In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
z.string()z.number()z.ZodTypeparse()safeParse()parseAsync()safeParseAsync()