Spaces:
Runtime error

File size: 1,144 Bytes
ad79323
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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>;