Spaces:
Runtime error

Ali-Developments's picture
Upload 125 files
ad79323 verified
Raw History Blame Contribute Delete
1.14 kB
import { z } from "zod";
export const registerSchema = z.object({
firstName: z
.string()
.trim()
.min(2, "الاسم الأول لازم يكون حرفين على الأقل.")
.max(50, "الاسم الأول طويل زيادة عن اللزوم."),
lastName: z
.string()
.trim()
.min(2, "اسم العيلة لازم يكون حرفين على الأقل.")
.max(50, "اسم العيلة طويل زيادة عن اللزوم."),
email: z
.string()
.trim()
.email("اكتب بريد إلكتروني صحيح.")
.max(120, "البريد الإلكتروني طويل زيادة عن اللزوم."),
password: z
.string()
.min(8, "كلمة السر لازم تكون 8 حروف أو أكتر.")
.max(72, "كلمة السر طويلة زيادة عن اللزوم."),
});
export const loginSchema = z.object({
email: z.string().trim().email("اكتب بريد إلكتروني صحيح."),
password: z.string().min(1, "اكتب كلمة السر."),
});
export type RegisterInput = z.infer<typeof registerSchema>;
export type LoginInput = z.infer<typeof loginSchema>;