fix: Don't verify password length on login

This commit is contained in:
April Hall 2025-02-09 21:28:49 -05:00
parent df50462d06
commit 76ebe5f802
Signed by: arithefirst
GPG Key ID: 4508A15C4DB91C5B

View File

@ -28,13 +28,7 @@ export const signupSchema = z
export const loginSchema = z.object({
email: z.string().nonempty('An email is required').email('Please enter a valid email.'),
password: z
.string()
.min(8, 'Password must be at least 8 characters.')
.regex(/(?=.*[A-Z])/gm, 'Password must contain at uppercase letter.')
.regex(/(?=.*[a-z])/gm, 'Password must contain at lowercase letter.')
.regex(/(?=.*\d)/gm, 'Password must contain at least one number.')
.regex(/(?=.*\W)/gm, 'Password must contain at least one special character'),
password: z.string().nonempty('Password must not be empty.'),
});
export type NewChannelSchema = typeof newChannelSchema;