diff --git a/packages/zod/src/v4/classic/schemas.ts b/packages/zod/src/v4/classic/schemas.ts index f9e3510ea..29900bfe1 100644 --- a/packages/zod/src/v4/classic/schemas.ts +++ b/packages/zod/src/v4/classic/schemas.ts @@ -1345,11 +1345,19 @@ export interface ZodTuple< Rest extends core.SomeType | null = core.$ZodType | null, > extends _ZodType>, core.$ZodTuple { + min(minLength: number, params?: string | core.$ZodCheckMinLengthParams): this; + nonempty(params?: string | core.$ZodCheckMinLengthParams): this; + max(maxLength: number, params?: string | core.$ZodCheckMaxLengthParams): this; + length(len: number, params?: string | core.$ZodCheckLengthEqualsParams): this; rest(rest: Rest): ZodTuple; } export const ZodTuple: core.$constructor = /*@__PURE__*/ core.$constructor("ZodTuple", (inst, def) => { core.$ZodTuple.init(inst, def); ZodType.init(inst, def); + inst.min = (minLength, params) => inst.check(checks.minLength(minLength, params)); + inst.nonempty = (params) => inst.check(checks.minLength(1, params)); + inst.max = (maxLength, params) => inst.check(checks.maxLength(maxLength, params)); + inst.length = (len, params) => inst.check(checks.length(len, params)); inst.rest = (rest) => inst.clone({ ...inst._zod.def,