Browse Source

Fix: Allow usernames starting from 2 characters (#1744)

* update username validation to support short usernames starting from 2 characters
pull/1745/head
Pokydko Oleksandr 3 weeks ago
committed by GitHub
parent
commit
653bd73d7f
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      src/server/database/repositories/user/types.ts

2
src/server/database/repositories/user/types.ts

@ -6,7 +6,7 @@ export type UserType = InferSelectModel<typeof user>;
const username = z const username = z
.string({ message: t('zod.user.username') }) .string({ message: t('zod.user.username') })
.min(8, t('zod.user.username')) .min(2, t('zod.user.username'))
.pipe(safeStringRefine); .pipe(safeStringRefine);
const password = z const password = z

Loading…
Cancel
Save