fix: input validation for 5 API routes #277

Closed
the-dogfather-cto[bot] wants to merge 6 commits from fix/gro-624-input-validation into main
Showing only changes of commit 53b2dc6067 - Show all commits
+4
View File
@@ -41,6 +41,10 @@ const createAppointmentSchema = z.object({
frequencyWeeks: z.number().int().min(1).max(52),
count: z.number().int().min(2).max(52),
})
.refine(
(r) => r.frequencyWeeks * r.count <= 52,
{ message: "Recurrence series must not exceed 1 year" }
)
.optional(),
});