Scheduling infrastructure for absolutely everyone.
phoneSchema missing async parsing (#10929)
Hariom Balhara99d0816d9fa6
diff --git a/packages/features/bookings/lib/getBookingResponsesSchema.ts b/packages/features/bookings/lib/getBookingResponsesSchema.tsindex 141362a8410..70417effa01 100644--- a/packages/features/bookings/lib/getBookingResponsesSchema.ts+++ b/packages/features/bookings/lib/getBookingResponsesSchema.ts@@ -223,7 +223,7 @@ function preprocess<T extends z.ZodType>({if (optionValue) {// `typeOfOptionInput` can be any of the main types. So, we the same validations should run for `optionValue`if (typeOfOptionInput === "phone") {- if (!phoneSchema.safeParse(optionValue).success) {+ if (!(await phoneSchema.safeParseAsync(optionValue)).success) {ctx.addIssue({ code: z.ZodIssueCode.custom, message: m("invalid_number") });}}