Skip to content
masterclass Buddy

Zod · Type Alias

ZodEnum

ZodEnum validates a fixed set of allowed values. You can also create one from the keys of an object schema with .keyof().

Last updated

Syntax

z.enum([value1, value2, ...])

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

Subscribe
  • Zod
  • ZodEnum
  • keyof()
  • object schemas
  • parse()

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