new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Zod · all subjects

schema definitions/numbers

4 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Number validation methods

z.number() supports: .gt(n) greater than, .gte(n) or .min(n) greater than or equal, .lt(n) less than, .lte(n) or .max(n) less than or equal, .positive() (alias .gt(0)), .nonnegative(), .negative(), .nonpositive(), .multipleOf(n) or .step(n). In Zod Mini, wrap these with .check(): z.number().check(z.gt(5)), etc.

z.number() does not allow NaN or Infinity

z.number() allows any finite number but rejects NaN and Infinity. To validate NaN specifically, use z.nan().

Integer validation in Zod

z.int() restricts to safe integer range. z.int32() restricts to int32 range.

Number format functions

z.int(), z.float32(), z.float64(), z.int32(), z.uint32() return ZodNumber with proper constraints. z.int() ranges [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER]. z.float32() ranges [-3.4028234663852886e38, 3.4028234663852886e38]. z.float64() ranges [-1.7976931348623157e308, 1.7976931348623157e308]. z.int32() ranges [-2147483648, 2147483647]. z.uint32() ranges [0, 4294967295].

Give your agent this brain