Files
parakasa/lib/schemas.ts

13 lines
655 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { z } from "zod"
export const contactFormSchema = z.object({
name: z.string().min(2, { message: "Ad en az 2 karakter olmalıdır." }),
surname: z.string().min(2, { message: "Soyad en az 2 karakter olmalıdır." }),
email: z.string().email({ message: "Geçerli bir e-posta adresi giriniz." }),
phone: z.string().min(10, { message: "Geçerli bir telefon numarası giriniz (En az 10 hane)." }),
subject: z.string().min(5, { message: "Konu en az 5 karakter olmalıdır." }),
message: z.string().min(10, { message: "Mesaj en az 10 karakter olmalıdır." }),
})
export type ContactFormValues = z.infer<typeof contactFormSchema>