Liking cljdoc? Tell your friends :D

typeid.validation

Validation predicates for TypeID components.

Manual validation predicates with zero external dependencies.

Validation predicates for TypeID components.

Manual validation predicates with zero external dependencies.
raw docstring

valid-base32-suffix?clj/s

(valid-base32-suffix? s)

Check if suffix is valid:

  • Exactly 26 characters
  • All characters in base32 alphabet
  • First character <= 7 (prevents overflow)
Check if suffix is valid:
- Exactly 26 characters
- All characters in base32 alphabet
- First character <= 7 (prevents overflow)
sourceraw docstring

valid-prefix?clj/s

(valid-prefix? s)

Check if prefix matches the TypeID prefix pattern.

Valid prefixes:

  • Empty string
  • 1-63 lowercase characters matching pattern: a-z?
Check if prefix matches the TypeID prefix pattern.

Valid prefixes:
- Empty string
- 1-63 lowercase characters matching pattern: [a-z]([a-z_]{0,61}[a-z])?
sourceraw docstring

valid-typeid-string?clj/s

(valid-typeid-string? s)

Check if string is a valid TypeID format.

  • Length between 26 and 90 characters (26 for suffix only, up to 63+1+26 with prefix)
  • All lowercase
Check if string is a valid TypeID format.
- Length between 26 and 90 characters (26 for suffix only, up to 63+1+26 with prefix)
- All lowercase
sourceraw docstring

valid-uuid-bytes?clj/s

(valid-uuid-bytes? b)

Check if bytes represent a valid UUID (exactly 16 bytes).

Check if bytes represent a valid UUID (exactly 16 bytes).
sourceraw docstring

valid-uuidv7-bytes?clj/s

(valid-uuidv7-bytes? b)

Stricter validation for generated UUIDs (version 7, variant 10). Checks:

  • Exactly 16 bytes
  • Version bits (48-51) = 0111 (7)
  • Variant bits (64-65) = 10
Stricter validation for generated UUIDs (version 7, variant 10).
Checks:
- Exactly 16 bytes
- Version bits (48-51) = 0111 (7)
- Variant bits (64-65) = 10
sourceraw docstring

validate-prefixclj/s

(validate-prefix prefix)

Validate prefix, return {:ok prefix} or {:error error-map}.

Validate prefix, return {:ok prefix} or {:error error-map}.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close