diff --git a/src/lib/zod.ts b/src/lib/zod.ts new file mode 100644 index 0000000..89246d1 --- /dev/null +++ b/src/lib/zod.ts @@ -0,0 +1,13 @@ +import { z } from "zod"; + +export const authSchema = z.object({ + email: z + .string() + .nonempty("Email is required") + .email("Invalid email"), + password: z + .string() + .nonempty("Password is required") + .min(8, "Password must be at least 8 characters") + .max(32, "Password must be less than 32 characters"), +});