We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f0174e0 commit a3e50c6Copy full SHA for a3e50c6
zod/src/zod.ts
@@ -3,7 +3,7 @@ import { z, ZodError } from 'zod';
3
import { toNestErrors, validateFieldsNatively } from '@hookform/resolvers';
4
import type { Resolver } from './types';
5
6
-const isZodError = (error: any): error is ZodError => error.errors != null;
+const isZodError = (error: any): error is ZodError => Array.isArray(error?.errors);
7
8
const parseErrorSchema = (
9
zodErrors: z.ZodIssue[],
0 commit comments