fix: allow one-char username on signup (#1378)

This commit is contained in:
taoso
2026-03-27 01:36:54 +08:00
committed by GitHub
parent 724c41cb7a
commit dc6558522e
6 changed files with 8 additions and 6 deletions

View File

@@ -20,6 +20,7 @@ func TestValidateUsername(t *testing.T) {
{"starts with symbol", ".username", false},
{"ends with non-alphanumeric", "username-", false},
{"contains space", "user name", false},
{"valid single char", "a", true},
{"empty", "", false},
{"only special chars", "-._@", false},
{"valid long", "a1234567890_b.c-d@e", true},