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

@@ -31,7 +31,7 @@ export const callbackUrlSchema = z
export const usernameSchema = z
.string()
.min(2)
.min(1)
.max(30)
.regex(/^[a-zA-Z0-9]/, m.username_must_start_with())
.regex(/[a-zA-Z0-9]$/, m.username_must_end_with())