Allow case sensitive usernames

This commit is contained in:
Fedor Indutny
2022-12-13 15:37:20 -08:00
committed by GitHub
parent 490a565b95
commit fdfc0539a3

View File

@@ -15,7 +15,7 @@ export function getMinNickname(): number {
}
export function isValidNickname(nickname: string): boolean {
if (!/^[a-z_][0-9a-z_]*$/.test(nickname)) {
if (!/^[a-z_][0-9a-z_]*$/i.test(nickname)) {
return false;
}
@@ -31,7 +31,7 @@ export function isValidNickname(nickname: string): boolean {
}
export function isValidUsername(username: string): boolean {
const match = username.match(/^([a-z_][0-9a-z_]*)(\.\d+)?$/);
const match = username.match(/^([a-z_][0-9a-z_]*)(\.\d+)?$/i);
if (!match) {
return false;
}