mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-17 16:01:22 +02:00
enforce password length
This commit is contained in:
parent
cfd0a15e2c
commit
d7e090e5b7
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ export const signupBodySchema = z.object({
|
||||||
password: z
|
password: z
|
||||||
.string()
|
.string()
|
||||||
.min(8, { message: "Password must be at least 8 characters long" })
|
.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])(?=.*?[#?!@$%^&*-]).*$/, {
|
.regex(/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).*$/, {
|
||||||
message: `Your password must meet the following conditions:
|
message: `Your password must meet the following conditions:
|
||||||
- At least one uppercase English letter.
|
- At least one uppercase English letter.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue