Optional
def: $ZodStringDefOptional
params: { parent: boolean }Optional
params: ParseContext<$ZodIssue>Optional
params: ParseContext<$ZodIssue>Optional
params: ParseContext<$ZodIssue>Optional
params: ParseContext<$ZodIssue>Optional
params: ParseContext<$ZodIssue>Optional
params: ParseContext<$ZodIssue>Optional
params: ParseContext<$ZodIssue>Optional
params: ParseContext<$ZodIssue>Optional
params: ParseContext<$ZodIssue>Optional
params: ParseContext<$ZodIssue>Optional
params: ParseContext<$ZodIssue>Optional
params: ParseContext<$ZodIssue>Optional
params: Optional
error?: string | $ZodErrorMap<NonNullable<$ZodIssue>>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
when?: (payload: ParsePayload) => booleanIf provided, this check will only be executed if the function returns true
. Defaults to payload => z.util.isAborted(payload)
.
Optional
path?: PropertyKey[]Optional
params?: Record<string, any>Optional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidType<unknown>>Optional
message?: 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
Optional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
params: {Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
position?: numberOptional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueTooSmall<HasLength>>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueTooBig<HasLength>>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
params: Optional
error?: Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueTooSmall<HasLength>>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
pattern?: RegExpOptional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
pattern?: RegExpOptional
form: string & {} | "NFC" | "NFD" | "NFKC" | "NFKD"Optional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
pattern?: RegExpOptional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
pattern?: RegExpOptional
hostname?: RegExpOptional
protocol?: RegExpOptional
normalize?: booleanOptional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
alg?: JWTAlgorithmOptional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
pattern?: RegExpOptional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
version?: "v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8"Optional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
version?: "v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8"Optional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
version?: "v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8"Optional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
version?: "v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8"Optional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
pattern?: RegExpOptional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
pattern?: RegExpOptional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
pattern?: RegExpOptional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
pattern?: RegExpOptional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
pattern?: RegExpOptional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
pattern?: RegExpOptional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
version?: "v4"Optional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
version?: "v6"Optional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
pattern?: RegExpOptional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
precision?: null | numberOptional
offset?: booleanOptional
local?: booleanOptional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
precision?: null | numberOptional
params: Optional
error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>Optional
message?: stringOptional
abort?: booleanIf true, no later checks will be executed if this check fails. Default false
.
Optional
pattern?: RegExp
Deprecated
This parameter is deprecated. Use
error
instead.