Spaces:
Sleeping

File size: 789 Bytes
4e83772
 
 
5a1ffec
4e83772
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import z from "zod";

export const SignUpSchema = z.object({
	name: z.string().min(3).max(30).regex(/^[^\p{Emoji_Presentation}\p{Extended_Pictographic}]*$/u, "Name cannot contain emojis"),
	email: z.email(),
	password: z.string().min(8).max(64).regex(/\d/, "Password must contain at least one number"),
});

export const LoginSchema = z.object({
	email: z.email(),
	password: z.string().min(8),
});
export const VerifyOtpSchema = z.object({
	email: z.email(),
	otp: z.number().min(6),
});
export const ResendOtpSchema = z.object({
	email: z.email(),
});

export type SignUpUserDTO = z.infer<typeof SignUpSchema>;
export type LoginUserDTO = z.infer<typeof LoginSchema>;
export type VerifyOtpDTO = z.infer<typeof VerifyOtpSchema>;
export type ResendOtpDTO = z.infer<typeof ResendOtpSchema>;