Scheduling infrastructure for absolutely everyone.
fix: hidden phone booking field should never need validation (#17564)
Anik Dhabal Babufc5ad53a6d6c
diff --git a/packages/features/bookings/lib/getBookingResponsesSchema.ts b/packages/features/bookings/lib/getBookingResponsesSchema.tsindex a2357ca2432..3045bc1977e 100644--- a/packages/features/bookings/lib/getBookingResponsesSchema.ts+++ b/packages/features/bookings/lib/getBookingResponsesSchema.ts@@ -236,7 +236,7 @@ function preprocess<T extends z.ZodType>({}if (bookingField.type === "phone") {- if (!(await phoneSchema.safeParseAsync(value)).success) {+ if (!bookingField.hidden && !(await phoneSchema.safeParseAsync(value)).success) {ctx.addIssue({ code: z.ZodIssueCode.custom, message: m("invalid_number") });}continue;