Browse Source

remove char validation altogether

pull/1745/head
Bernd Storath 7 days ago
parent
commit
d4c58d5e94
  1. 4
      src/i18n/locales/en.json
  2. 4
      src/server/database/repositories/user/types.ts

4
src/i18n/locales/en.json

@ -189,10 +189,6 @@
"user": {
"username": "Username",
"password": "Password",
"passwordUppercase": "Password must have at least 1 uppercase letter",
"passwordLowercase": "Password must have at least 1 lowercase letter",
"passwordNumber": "Password must have at least 1 number",
"passwordSpecial": "Password must have at least 1 special character",
"remember": "Remember",
"name": "Name",
"email": "Email",

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

@ -12,10 +12,6 @@ const username = z
const password = z
.string({ message: t('zod.user.password') })
.min(12, t('zod.user.password'))
.regex(/[A-Z]/, t('zod.user.passwordUppercase'))
.regex(/[a-z]/, t('zod.user.passwordLowercase'))
.regex(/\d/, t('zod.user.passwordNumber'))
.regex(/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/? ]/, t('zod.user.passwordSpecial'))
.pipe(safeStringRefine);
const remember = z.boolean({ message: t('zod.user.remember') });

Loading…
Cancel
Save