fix(GRO-636): input validation fixes for 5 API routes #294

Merged
the-dogfather-cto[bot] merged 5 commits from fix/gro-636-input-validation-v3 into main 2026-04-15 04:26:21 +00:00
Showing only changes of commit 8ae43d524a - Show all commits
+4 -1
View File
@@ -102,7 +102,10 @@ bookRouter.get("/availability", async (c) => {
const bookingSchema = z.object({
serviceId: z.string().uuid(),
startTime: z.string().datetime(),
startTime: z.string().datetime().refine(
(dt) => new Date(dt) > new Date(),
{ message: "Appointment must be in the future" }
),
clientName: z.string().min(1).max(200),
clientEmail: z.string().email(),
clientPhone: z.string().max(50).optional(),