OptionaldescriptionOptionalvalue: TOptionaldef: $ZodNullableDef<T>Optionalparams: { parent: boolean }Returns 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<$ZodIssueInvalidType<unknown>>Optionalmessage?: stringOptionalparams: Optionalabort?: booleanIf true, no later checks will be executed if this check fails. Default false.
Optionalerror?: string | $ZodErrorMap<NonNullable<$ZodIssue>>Optionalmessage?: stringOptionalparams?: Record<string, any>Optionalpath?: PropertyKey[]Optionalwhen?: (payload: ParsePayload) => booleanIf provided, the check runs only when this returns true. By default, it is skipped if prior parsing produced aborting issues.
Optionalparams: ParseContext<$ZodIssue>Optionalparams: ParseContext<$ZodIssue>Converts this schema to a JSON Schema representation.
Optionalparams: ToJSONSchemaParams
Deprecated
Use
.definstead.