allow comma in password closes #121

This commit is contained in:
Milo Schwartz 2025-01-31 15:03:36 -05:00
parent 57cd776c34
commit bb5573a8f4
No known key found for this signature in database
2 changed files with 4 additions and 6 deletions

View file

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