Fix: Make 3-letter usernames possible
This commit is contained in:
parent
dafc5db725
commit
93f0bfc84c
|
@ -274,7 +274,7 @@ export function flashMessage(message: string, error = false): void {
|
||||||
// https://gitlab.com/tildes/tildes/blob/master/tildes/tildes/schemas/user.py
|
// https://gitlab.com/tildes/tildes/blob/master/tildes/tildes/schemas/user.py
|
||||||
export function isValidTildesUsername(username: string): boolean {
|
export function isValidTildesUsername(username: string): boolean {
|
||||||
return (
|
return (
|
||||||
username.length > 3 &&
|
username.length > 2 &&
|
||||||
username.length < 20 &&
|
username.length < 20 &&
|
||||||
/^[a-z0-9]([a-z0-9]|[_-](?![_-]))*[a-z0-9]$/i.exec(username) !== null
|
/^[a-z0-9]([a-z0-9]|[_-](?![_-]))*[a-z0-9]$/i.exec(username) !== null
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue