Skip to main content

Variable: PATTERN_RULES

const PATTERN_RULES: object

Defined in: packages/contracts/src/validation.ts:190

The patterns the contracts define, by a name a message can be chosen by. Adding a pattern primitive adds it here, or its failures read as a generic "not in the form".

Type Declaration​

bundle-code​

readonly bundle-code: "^[A-Z][A-Z0-9_]{0,63}$" = BUNDLE_CODE_PATTERN

display-name​

readonly display-name: string = DISPLAY_NAME_PATTERN

scope-path​

readonly scope-path: "^(/|(/[a-z0-9][a-z0-9-]{0,62}){1,16})$" = SCOPE_PATH_PATTERN

slug​

readonly slug: "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$" = SLUG_PATTERN

tenant-scope-path​

readonly tenant-scope-path: "^(/[a-z0-9][a-z0-9-]{0,62}){1,16}$" = TENANT_SCOPE_PATH_PATTERN

unreserved-label​

readonly unreserved-label: "^(?!..--)" = UNRESERVED_LABEL_PATTERN

uuid​

readonly uuid: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" = UUID_PATTERN