OptionaldescriptionOptionaldef: $ZodStringDefOptionalparams: { parent: boolean }Optionalparams: ParseContext<$ZodIssue>Optionalparams: ParseContext<$ZodIssue>Optionalparams: ParseContext<$ZodIssue>Optionalparams: ParseContext<$ZodIssue>Optionalparams: ParseContext<$ZodIssue>Optionalparams: ParseContext<$ZodIssue>Optionalparams: ParseContext<$ZodIssue>Optionalparams: ParseContext<$ZodIssue>Optionalparams: ParseContext<$ZodIssue>Optionalparams: ParseContext<$ZodIssue>Optionalparams: ParseContext<$ZodIssue>Optionalparams: ParseContext<$ZodIssue>Optionalparams: Optionalerror?: string | $ZodErrorMap<NonNullable<$ZodIssue>>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalwhen?: (payload: ParsePayload) => booleanIf provided, this check will only be executed if the function returns true. Defaults to payload => z.util.isAborted(payload).
Optionalpath?: PropertyKey[]Optionalparams?: Record<string, any>Optionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidType<unknown>>Optionalmessage?: stringReturns a new instance that has been registered in z.globalRegistry with the specified description
Returns the metadata associated with this instance in z.globalRegistry
Returns a new instance that has been registered in z.globalRegistry with the specified metadata
Optionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalparams: {Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalposition?: numberOptionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueTooSmall<HasLength>>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueTooBig<HasLength>>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalparams: Optionalerror?: Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueTooSmall<HasLength>>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalpattern?: RegExpOptionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalpattern?: RegExpOptionalform: string & {} | "NFC" | "NFD" | "NFKC" | "NFKD"Optionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalpattern?: RegExpOptionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalpattern?: RegExpOptionalhostname?: RegExpOptionalprotocol?: RegExpOptionalnormalize?: booleanOptionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalalg?: JWTAlgorithmOptionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalpattern?: RegExpOptionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalversion?: "v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8"Optionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalversion?: "v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8"Optionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalversion?: "v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8"Optionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalversion?: "v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8"Optionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalpattern?: RegExpOptionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalpattern?: RegExpOptionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalpattern?: RegExpOptionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalpattern?: RegExpOptionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalpattern?: RegExpOptionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalpattern?: RegExpOptionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalversion?: "v4"Optionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalversion?: "v6"Optionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalpattern?: RegExpOptionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalprecision?: null | numberOptionaloffset?: booleanOptionallocal?: booleanOptionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalprecision?: null | numberOptionalparams: Optionalerror?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optionalmessage?: stringOptionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalpattern?: RegExp
Deprecated
Use
.definstead.