Skip to content

isValidRecordKey

isValidRecordKey(key): boolean

Defined in: packages/core/src/fields/keyValue/utils.ts:13

Whether key is a legal Convex record key: non-empty, ASCII-only, and not starting with "$" (Convex-internal) or "_" (reserved for system fields). Applies to both default v.string() keys and the entered side of a v.id(collection) key — a real id never collides with either prefix.

string

The candidate record key.

boolean

true if key is a legal Convex record key.