Closed davidmz closed 9 years ago
Same for usernames. I agree only latin and underscore are allowed (pretty much the same as in Twitter). UPD: http://stackoverflow.com/a/6351873
I remembered that in old FrF hyphen (-) was permitted too (in groupname 'save-our-snobs', for example).
Good catch! I guess group could start with an underscore, however not with a hyphen?
There are no usernames/groupnames with underscore in my personal FrF backup (my friends and some other users/groups). Moreover, there is no single USERnames with hyphens, hyphens are present only in groupnames. Maybe we should check the Clio archives?
"-" replaced any spaces entered in username. No special characters were permitted.
Let me know if tests are missing anything:
Group
#isValidUsername ()
✓ should allow username luna
✓ should allow username 12345
✓ should allow username hello1234
✓ should allow username save-our-snobs
✓ should not allow invalid username lu
✓ should not allow invalid username -12345
✓ should not allow invalid username luna-
✓ should not allow invalid username hel--lo
✓ should not allow invalid username абизьян
User
#isValidUsername ()
✓ should allow username luna (93ms)
✓ should allow username 12345 (84ms)
✓ should allow username hello1234 (79ms)
✓ should not allow invalid username lu
✓ should not allow invalid username -12345
✓ should not allow invalid username luna-
✓ should not allow invalid username hel--lo
✓ should not allow invalid username save-our-snobs
✓ should not allow invalid username абизьян
Group name autogeneration: https://github.com/pepyatka/pepyatka-html/issues/448
Example: https://micropeppa.freefeed.net/микрогруппа