x/zod/mod.ts

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.17.3/mod.ts?s=ZodError";

Constructors

new
ZodError(issues: ZodIssue[])
[src]

Type Parameters

optional
T = any
[src]

Properties

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

Methods

flatten(): typeToFlattenedError<T>[src]
flatten<U>(mapper?: (issue: ZodIssue) => U): typeToFlattenedError<T, U>[src]
flatten<U = string>(mapper?: (issue: ZodIssue) => U): any[src]
format(): ZodFormattedError<T>[src]
format<U>(mapper: (issue: ZodIssue) => U): ZodFormattedError<T, U>[src]
format(_mapper?: any)[src]
toString()[src]

Static Properties

create: (issues: ZodIssue[]) => unknown[src]
import ZodError
import { ZodError } from "https://deno.land/x/zod@v3.17.3/mod.ts?s=ZodError";