diff --git a/index.ts b/index.ts index cfe943e..b883ec0 100644 --- a/index.ts +++ b/index.ts @@ -31,7 +31,7 @@ export function toFormikValidationSchema( return { async validate(obj: T) { try { - await Promise.resolve(schema.parse(obj)); + await schema.parseAsync(obj); } catch (err: unknown) { throw createValidationError(err as z.ZodError); }