Vital and libphonenumber-js (#20547)

This commit is contained in:
Keith Williams authored and GitHub committed 2025-04-04 13:35:12 +00:00
1 parent 3d583678cf
commit 19f2197eef
2 files changed
+2 -2

No files matched your search

@@ -1,3 +1,4 @@
import { isValidPhoneNumber } from "libphonenumber-js";
import z from "zod";
import type { ALL_VIEWS } from "@calcom/features/form-builder/schema";
@@ -144,7 +145,6 @@ function preprocess<T extends z.ZodType>({
const phoneSchema = isPartialSchema
? z.string()
: z.string().refine(async (val) => {
const { isValidPhoneNumber } = await import("libphonenumber-js");
return isValidPhoneNumber(val);
});
// Tag the message with the input name so that the message can be shown at appropriate place