diff --git a/app/sign-up-form.tsx b/app/sign-up-form.tsx index 6840111..93a6f18 100644 --- a/app/sign-up-form.tsx +++ b/app/sign-up-form.tsx @@ -5,15 +5,7 @@ import { useForm } from "react-hook-form"; import { z } from "zod"; import { Button } from "@/components/ui/button"; -import { - Form, - FormControl, - FormDescription, - FormField, - FormItem, - FormLabel, - FormMessage, -} from "@/components/ui/form"; +import { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from "@/components/ui/form"; import { format } from "date-fns"; import { CalendarIcon } from "lucide-react"; import { Input } from "@/components/ui/input"; @@ -24,9 +16,9 @@ import { signupFormSubmit } from "@/lib/actions"; import { useState } from "react"; export const signupFormSchema = z.object({ - name: z.string().min(2, { message: "Name is required" }).max(50, { message: "Name is too long" }), - email: z.string().email({ message: "Email is invalid" }), - dob: z.date({ required_error: "Birthday is required" }), + name: z.string().min(2, { error: "Name is required" }).max(50, { error: "Name is too long" }), + email: z.email({ error: "Email is invalid" }), + dob: z.date({ error: "Birthday is required" }), }); export const youngestDate = new Date(new Date().setFullYear(new Date().getFullYear() - 20)); export const oldestDate = new Date(new Date().setFullYear(new Date().getFullYear() - 100)); @@ -59,9 +51,7 @@ export default function SignUp() { - - We will contact you here with information about events. - + We will contact you here with information about events. )} @@ -91,10 +81,7 @@ export default function SignUp() {