move auth utils

This commit is contained in:
Milo Schwartz 2024-10-05 22:31:30 -04:00
parent 0575c0196e
commit 56326f7d6c
9 changed files with 12 additions and 12 deletions

View 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.`,
});