User: enforce {1,30} character limit on username

This commit is contained in:
Alex Gleason 2023-07-09 12:29:49 -05:00
parent c93aa5b314
commit 7808565d71
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ const kv = await Deno.openKv();
const userSchema = z.object({
pubkey: z.string().regex(/^[0-9a-f]{64}$/).describe('primary'),
username: z.string().regex(/^[\w_]+$/).describe('unique'),
username: z.string().regex(/^[\w_]{1,30}$/).describe('unique'),
createdAt: z.date(),
});