From 7246d4c723f10be8a5deaa5613112ec84974d38a Mon Sep 17 00:00:00 2001 From: Bas van den Aakster Date: Sat, 13 Dec 2025 18:24:16 +0100 Subject: [PATCH] Allow periods in usernames Update username validation regex to allow periods (.) in addition to alphanumeric characters and dashes. Usernames must still start and end with alphanumeric characters. --- src/crypto.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto.ts b/src/crypto.ts index b5b8b2e..8d1610b 100644 --- a/src/crypto.ts +++ b/src/crypto.ts @@ -14,7 +14,7 @@ ed25519.hashes.sha512Async = async (message: Uint8Array) => { }; // Username validation -const USERNAME_REGEX = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/; +const USERNAME_REGEX = /^[a-z0-9][a-z0-9.-]*[a-z0-9]$/; const USERNAME_MIN_LENGTH = 3; const USERNAME_MAX_LENGTH = 32;