23 lines
665 B
TypeScript
Executable File
23 lines
665 B
TypeScript
Executable File
import { z } from 'zod';
|
|
|
|
export const contactFormSchema = z.object({
|
|
name: z.string().min(2, 'Name must be at least 2 characters'),
|
|
email: z.string().email('Please enter a valid email address'),
|
|
phone: z.string().optional(),
|
|
message: z.string().min(10, 'Message must be at least 10 characters'),
|
|
});
|
|
|
|
export const serviceSchema = z.object({
|
|
id: z.string(),
|
|
title: z.string(),
|
|
description: z.string(),
|
|
slug: z.string(),
|
|
image: z.string(),
|
|
heroImage: z.string(),
|
|
detailImage: z.string(),
|
|
features: z.array(z.string()),
|
|
});
|
|
|
|
export type ContactFormData = z.infer<typeof contactFormSchema>;
|
|
export type Service = z.infer<typeof serviceSchema>;
|