Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/zod/ZodError.ts>ZodError

TypeScript-first schema validation with static type inference
Very Popular
Go to Latest
class ZodError
extends Error
import { ZodError } from "https://deno.land/x/zod@v3.23.3/ZodError.ts";

Constructors

new
ZodError(issues: ZodIssue[])

Type Parameters

optional
T = any

Properties

addIssue: (sub: ZodIssue) => unknown
addIssues: (subs?: ZodIssue[]) => unknown
readonly
errors
readonly
formErrors
readonly
isEmpty: boolean
issues: ZodIssue[]
readonly
message

Static Properties

create: (issues: ZodIssue[]) => unknown

Static Methods

assert(value: unknown): asserts value is ZodError