mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-03-23 10:10:09 +00:00
feat: allow uppercase usernames (#958)
This commit is contained in:
@@ -26,3 +26,11 @@ export const callbackUrlSchema = z
|
||||
message: m.invalid_redirect_url()
|
||||
}
|
||||
);
|
||||
|
||||
export const usernameSchema = z
|
||||
.string()
|
||||
.min(2)
|
||||
.max(30)
|
||||
.regex(/^[a-zA-Z0-9]/, m.username_must_start_with())
|
||||
.regex(/[a-zA-Z0-9]$/, m.username_must_end_with())
|
||||
.regex(/^[a-zA-Z0-9_.@-]+$/, m.username_can_only_contain());
|
||||
|
||||
Reference in New Issue
Block a user