Skip to content
masterclass Buddy

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.

Subscribe
  • z.string()
  • z.number()
  • z.ZodType
  • parse()
  • safeParse()
  • parseAsync()
  • safeParseAsync()

Source: Zod | Zod ๐Ÿ’Ž. Checked 2026-11-03.