Skip to main content

Function: _cuid()

_cuid<T>(Class, params?): T

Defined in: packages/agentos/node_modules/zod/v4/core/api.d.cts:69

Type Parameters

T

T extends $ZodCUID

Parameters

Class

SchemaClass<T>

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<NonNullable<$ZodIssueInvalidType<unknown> | $ZodIssueInvalidStringFormat>>; message?: string; pattern?: RegExp; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<NonNullable<$ZodIssueInvalidType<unknown> | $ZodIssueInvalidStringFormat>>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

pattern?

RegExp

|

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; pattern?: RegExp; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

pattern?

RegExp

Returns

T

Deprecated

CUID v1 is deprecated by its authors due to information leakage (timestamps embedded in the id). Use _cuid2 instead. See https://github.com/paralleldrive/cuid.