@sports-app/shared — the wire contract
    Preparing search index...

    Variable UsernameConst

    Username: TString = ...

    The one username rule, expressed for a validator.

    USERNAME_PATTERN.source rather than a copy of the pattern text: the regex and the schema are the same rule and must not be able to disagree. The length cap is already inside the pattern, so there is no maxLength here either — a second statement of the bound is a second thing to keep in step.

    description carries USERNAME_RULE so a generated schema document says what the rule is rather than making a reader decode the character class.