Class ZodArray<T, Cardinality>

Type Parameters

Hierarchy (View Summary)

Constructors

Properties

_def: ZodArrayDef<T>
_input: Cardinality extends "atleastone"
    ? [T["_input"], ...T["_input"][]]
    : T["_input"][]
spa: (
    data: unknown,
    params?: Partial<ParseParams>,
) => Promise<
    SafeParseReturnType<
        Cardinality extends "atleastone"
            ? [T["_input"], ...T["_input"][]]
            : T["_input"][],
        arrayOutputType<T, Cardinality>,
    >,
>

Alias of safeParseAsync

create: <T_1 extends ZodType<any, any, any, T_1>>(
    schema: T_1,
    params?: RawCreateParams,
) => ZodArray<T_1, "many">

Accessors

  • get description(): undefined | string
  • Returns undefined | string

  • get element(): T
  • Returns T

Methods

  • Parameters

    Returns string

  • Parameters

    • description: string

    Returns this

  • Returns boolean

  • Returns boolean

  • Parameters

    • len: number
    • Optionalmessage: ErrMessage

    Returns this

  • Parameters

    • maxLength: number
    • Optionalmessage: ErrMessage

    Returns this

  • Parameters

    • minLength: number
    • Optionalmessage: ErrMessage

    Returns this

  • Parameters

    • Optionalmessage: ErrMessage

    Returns ZodArray<T, "atleastone">