1
0
mirror of https://github.com/pocket-id/pocket-id.git synced 2026-02-14 23:25:10 +00:00

feat: add support for more username formats

This commit is contained in:
Elias Schneider
2024-09-03 22:35:18 +02:00
parent fd21ce5aac
commit 903b0b3918
4 changed files with 9 additions and 8 deletions

View File

@@ -32,7 +32,10 @@
.string()
.min(2)
.max(30)
.regex(/^[a-z0-9_]+$/, 'Only lowercase letters, numbers, and underscores are allowed'),
.regex(
/^[a-z0-9_@.-]+$/,
"Username can only contain lowercase letters, numbers, underscores, dots, hyphens, and '@' symbols"
),
email: z.string().email(),
isAdmin: z.boolean()
});