Skip to main content

NAME_SLUG_REGEX

Constant NAME_SLUG_REGEX 

Source
pub const NAME_SLUG_REGEX: &str = r"^[a-z][a-z0-9-]{0,78}[a-z0-9]$|^[a-z0-9]$";
Expand description

PRD-canonical regex that validates names and namespaces. Allows 1 char [a-z0-9] OR a 2-80 char string starting with a letter and ending with a letter/digit, containing only [a-z0-9-]. Rejects the __ prefix (internal reserved).