Class ZodArray<T, Cardinality>

Type Parameters

Hierarchy (View Summary)

Constructors

Properties

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

Alias of safeParseAsync

create: <T_1 extends Zod.z.ZodTypeAny>(
    schema: T_1,
    params?: Zod.z.RawCreateParams,
) => Zod.z.ZodArray<T_1, "many">

Accessors

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

  • get element(): T
  • Returns T

Methods

  • 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 Zod.z.ZodArray<T, "atleastone">