Skip to main content
Validate a string is safe for use as a unique identifier (only lowercase letters, numbers, and hyphens).

Parameters

string
required
The string to validate
string
required
The name of the identifier, for error messages
required
The error type to return if validation fails

Returns

Result<void, T>
Last modified on July 27, 2026