Skip to content

Feature Request: Generalize :username Validator for Broader Use #168

@alexskr

Description

@alexskr

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:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions