x/zod/mod.ts

TypeScript-first schema validation with static type inference
Very Popular
Go to Latest
class ZodArray
extends ZodType<arrayOutputType<T, Cardinality>, ZodArrayDef<T>, Cardinality extends "atleastone" ? [T["_input"], ...T["_input"][]] : T["_input"][]>
import { ZodArray } from "https://deno.land/x/zod@v3.17.3/mod.ts?s=ZodArray";

Type Parameters

T extends ZodTypeAny[src]
optional
Cardinality extends ArrayCardinality = "many"
[src]

Properties

readonly
element
[src]

Methods

_parse(input: ParseInput): ParseReturnType<this["_output"]>[src]
length(len: number, message?: errorUtil.ErrMessage): this[src]
max(maxLength: number, message?: errorUtil.ErrMessage): this[src]
min(minLength: number, message?: errorUtil.ErrMessage): this[src]
nonempty(message?: errorUtil.ErrMessage): ZodArray<T, "atleastone">[src]

Static Properties

create: <T extends ZodTypeAny>(schema: T, params?: RawCreateParams) => ZodArray<T>[src]