forked from ontoportal/goo
-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
Description
The new :username
validator added in #166 enforces constraints suitable for usernames:
- 3–32 characters
- starts with a letter
- contains only ASCII letters, digits, dots, and underscores
- excludes invisible or reserved terms
Request:
Generalize this validator by renaming it to something like :identifier
, :safe_token
, or :clean_name
, so it’s not limited to usernames. These rules are broadly useful for other user-supplied attributes that require safe, human-readable strings — e.g., acronyms, labels, slugs.
Rationale:
The current :username
name implies a user-account-specific use, but the underlying validation logic is more generally applicable as a datatype constraint.
Acronym validation implemented at the model level for ontologies and slices, but is inconsistently applied across other acronyms in projects, groups, and categories.
Relevant issues: