Service Layer low complexity shared
0
Dependencies
2
Dependents
0
Entities
0
Integrations

Description

Shared Zod schema definitions and validation logic for the booking form, providing a single source of truth for field rules used on both the client (React) and the server (Next.js API route). Ensures that validation behavior is identical at both layers and prevents schema drift between client and server.

Feature: Booking Form

lead-validation-service

Responsibilities

  • Define Zod schema for all booking form fields with type, format, and length constraints
  • Export typed TypeScript interfaces derived from the Zod schema
  • Provide parse and safeParse utilities consumable by both frontend and backend

Interfaces

bookingSchema: ZodObject
parseBooking(data: unknown): BookingFormData
safeParseBooking(data: unknown): SafeParseResult<BookingFormData>

Relationships

Dependents (2)

Components that depend on this component