Skip to content

validateKeySegment

function validateKeySegment(
value,
path,
options?
): ValidationIssue[];

Defined in: src/util/validation.ts:143

Check a caller-supplied value that becomes one storage key segment (a tenant, an idempotency key…). It must be a non-empty string of KEY_SEGMENT_REGEX characters and must not be only dots, so it can’t escape its namespace (..) or collide with the separator. maxLength caps it (webhooks: 256).

Parameter Type
value unknown
path string
options? { maxLength?: number; }
options.maxLength? number

ValidationIssue[]