From fce157314fbb868b0c68b8424053fbbd77c24c01 Mon Sep 17 00:00:00 2001 From: Ryan <7389646+ryanbarlow97@users.noreply.github.com> Date: Tue, 3 Feb 2026 13:42:12 +0000 Subject: [PATCH] fix: validate base username length separately from clan tag (#3098) ## Description: fix: validate base username length separately from clan tag) ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: w.o.n --- src/client/UsernameInput.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/UsernameInput.ts b/src/client/UsernameInput.ts index cfff06a1f..11889cd67 100644 --- a/src/client/UsernameInput.ts +++ b/src/client/UsernameInput.ts @@ -147,8 +147,8 @@ export class UsernameInput extends LitElement { } private validateAndStore() { - // Prevent empty username even if clan tag is present - if (!this.baseUsername.trim()) { + // Validate base username meets minimum length (clan tag doesn't count) + if (this.baseUsername.trim().length < MIN_USERNAME_LENGTH) { this._isValid = false; this.validationError = translateText("username.too_short", { min: MIN_USERNAME_LENGTH,