Latch.RecordKey (latch v0.5.0)

Copy Markdown

Record keys have a defined set of allowed shapes: TID, NSID, literal:<value>, and any.

https://atproto.com/specs/record-key

Summary

Functions

Validates record key syntax according to the spec.

Functions

valid?(key)

@spec valid?(String.t()) :: boolean()

Validates record key syntax according to the spec.

From the spec:

  • the allowed characters are alphanumeric (A-Za-z0-9), period, dash, underscore, colon, or tilde (.-_:~)
  • must have at least 1 and at most 512 characters
  • the specific record key values . and .. are not allowed