phoneSchema missing async parsing (#10929)
parent
95f4b89fe8
commit
99d0816d9f
|
@ -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") });
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue