From 93f0bfc84cbf1bd671a8e63ea1ce43649bb46407 Mon Sep 17 00:00:00 2001 From: Bauke Date: Thu, 14 Nov 2019 11:17:25 +0100 Subject: [PATCH] Fix: Make 3-letter usernames possible --- source/ts/utilities.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ts/utilities.ts b/source/ts/utilities.ts index 7f0c9a4..127cfbf 100644 --- a/source/ts/utilities.ts +++ b/source/ts/utilities.ts @@ -274,7 +274,7 @@ export function flashMessage(message: string, error = false): void { // https://gitlab.com/tildes/tildes/blob/master/tildes/tildes/schemas/user.py export function isValidTildesUsername(username: string): boolean { return ( - username.length > 3 && + username.length > 2 && username.length < 20 && /^[a-z0-9]([a-z0-9]|[_-](?![_-]))*[a-z0-9]$/i.exec(username) !== null );