remix-demo

react router (remix) demo

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

userInvite.ts

(438B)


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