Closed Leialoha closed 1 year ago
Hey thanks for the PR! Fixed a rookie mistake there :)
Before I merge, Minecraft usernames can indeed not have a length of 0 but they can have one letter: https://namemc.com/profile/F.1
So just having {1,16}
would be enough!
Seems good! Thanks a lot!
You can use
return username.match(/^[a-z0-9_]{3,16}$/i);
without having to use an if else condition.For username checking, the usernames have to be from 3 to 16
{3,16}
characters, using*
will check for names with 0 or more characters, which are not valid usernames.