social-app
social-app copied to clipboard
Unfriendly checking of handle string in account creation screen
Describe the bug
If user enter a string longer than 63 characters as a handle in Step 2 of the account creation screen, you will get a message saying that you are in violation of the rule 'Only contains letters, numbers, and hyphen'.
To Reproduce
63 characters (only letters and numbers)
64 characters (only letters and numbers)
Details
- Platform: Firefox on Windows 11
- App version: 1.78
Additional context
The problem appears to be caused by the fact that VALIDATE_REGEX checks not only the type of character but also the length of the character, but only displays the type of character on the screen as a error message.
https://github.com/bluesky-social/social-app/blob/d5982891fa0f79a5bc00eccb66be2611fb2d3502/src/lib/strings/handles.ts#L3
Oh, nice. The 63 character count is actually supposed to be there (unless we removed this limit, but I don't think we did). But should be a separate error for sure. Thanks!