Skip to content
masterclass Buddy

Zod · Method

.strict

The .strict() method makes unknown keys invalid for an object schema. A parse fails when the input contains a key not declared in the schema.

Last updated

Syntax

schema.strict()

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • z.object()
  • z.strictObject()
  • z.looseObject()
  • .catchall()
  • .parse()
  • safeParse()

Source: Defining schemas | Zod. Checked 2026-11-03.