remix-demo

react router (remix) demo

git clone https://9o.is/git/remix-demo.git

login.ts

(334B)


      1 import { withZod } from "@remix-validated-form/with-zod";
      2 import { z } from "zod";
      3 
      4 export const loginSchema = z.object({
      5   email: z
      6     .string()
      7     .min(1, { message: "Email is required" })
      8     .max(64, { message: "Email is too long" })
      9     .email("Must be a valid email"),
     10 });
     11 
     12 export const loginValidator = withZod(loginSchema);