mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-31 06:59:33 +02:00
move auth utils
This commit is contained in:
parent
0575c0196e
commit
56326f7d6c
9 changed files with 12 additions and 12 deletions
13
server/auth/passwordSchema.ts
Normal file
13
server/auth/passwordSchema.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
import z from "zod";
|
||||
|
||||
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])(?=.*?[#?!@$%^&*-]).*$/, {
|
||||
message: `Your password must meet the following conditions:
|
||||
- At least one uppercase English letter.
|
||||
- At least one lowercase English letter.
|
||||
- At least one digit.
|
||||
- At least one special character.`,
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue