Hierarchy (View Summary)

Constructors

Properties

_input: number
_output: number
_type: number
max: (value: number, message?: ErrMessage) => ZodNumber
min: (value: number, message?: ErrMessage) => ZodNumber
spa: (
    data: unknown,
    params?: Partial<ParseParams>,
) => Promise<SafeParseReturnType<number, number>>

Alias of safeParseAsync

step: (value: number, message?: ErrMessage) => ZodNumber
create: (
    params?: {
        description?: string;
        errorMap?: ZodErrorMap;
        invalid_type_error?: string;
        message?: string;
        required_error?: string;
    } & { coerce?: boolean },
) => ZodNumber

Accessors

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

  • get isFinite(): boolean
  • Returns boolean

  • get isInt(): boolean
  • Returns boolean

  • get maxValue(): null | number
  • Returns null | number

  • get minValue(): null | number
  • Returns null | number

Methods

  • Parameters

    Returns string

  • Type Parameters

    • B extends string | number | symbol

    Parameters

    • Optionalbrand: B

    Returns ZodBranded<ZodNumber, B>

  • Parameters

    • description: string

    Returns this

  • Parameters

    • Optionalmessage: ErrMessage

    Returns ZodNumber

  • Parameters

    • value: number
    • Optionalmessage: ErrMessage

    Returns ZodNumber

  • Parameters

    • value: number
    • Optionalmessage: ErrMessage

    Returns ZodNumber

  • Parameters

    • Optionalmessage: ErrMessage

    Returns ZodNumber

  • Returns boolean

  • Returns boolean

  • Parameters

    • value: number
    • Optionalmessage: ErrMessage

    Returns ZodNumber

  • Parameters

    • value: number
    • Optionalmessage: ErrMessage

    Returns ZodNumber

  • Parameters

    • value: number
    • Optionalmessage: ErrMessage

    Returns ZodNumber

  • Parameters

    • Optionalmessage: ErrMessage

    Returns ZodNumber

  • Parameters

    • Optionalmessage: ErrMessage

    Returns ZodNumber

  • Parameters

    • Optionalmessage: ErrMessage

    Returns ZodNumber

  • Parameters

    Returns number

  • Parameters

    Returns Promise<number>

  • Parameters

    • Optionalmessage: ErrMessage

    Returns ZodNumber

  • Parameters

    • Optionalmessage: ErrMessage

    Returns ZodNumber

  • Parameters

    • kind: "max" | "min"
    • value: number
    • inclusive: boolean
    • Optionalmessage: string

    Returns ZodNumber