Spaces:
Runtime error
Runtime error
Download src/server/validation/auth.ts from Ali-Developments/COURTRIX: direct link, hf CLI and curl.
- Browser
- Download file 1.14 kB
-
https://huggingface.co/spaces/Ali-Developments/COURTRIX/resolve/main/src/server/validation/auth.ts
- Command line
-
hf download hf://spaces/Ali-Developments/COURTRIX/src/server/validation/auth.ts
-
curl -L -o auth.ts https://huggingface.co/spaces/Ali-Developments/COURTRIX/resolve/main/src/server/validation/auth.ts
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>; | |