enforce password length

This commit is contained in:
Milo Schwartz 2024-10-02 20:06:58 -04:00
parent cfd0a15e2c
commit d7e090e5b7
No known key found for this signature in database

View file

@ -16,7 +16,7 @@ export const signupBodySchema = z.object({
password: z
.string()
.min(8, { message: "Password must be at least 8 characters long" })
.max(31, { message: "Password must be at most 31 characters long" })
.max(64, { message: "Password must be at most 64 characters long" })
.regex(/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).*$/, {
message: `Your password must meet the following conditions:
- At least one uppercase English letter.