Skip to content
masterclass Buddy

Zod · Method

.positive

z.number().positive() validates finite numbers greater than zero. It is useful when a value must be numeric and strictly positive.

Last updated

Syntax

z.number().positive()

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

Subscribe
  • z.number()
  • z.int()
  • z.int32()
  • z.nan()
  • z.bigint()
  • z.positive()

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