(str: string)
| 31 | }; |
| 32 | |
| 33 | export const isValidUsername = (str: string): Validated => { |
| 34 | if (!validCharsRE.test(str)) return invalidCharError; |
| 35 | if (str.length < 3) return usernameTooShort; |
| 36 | if (isHttpStatusCode(str)) return usernameIsHttpStatusCode; |
| 37 | return validationSuccess; |
| 38 | }; |
| 39 | |
| 40 | // link template: |
| 41 | // https://learn.microsoft.com/LOCALE/users/USERNAME/transcript/ID |
no test coverage detected