Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

ZodError

class ZodError extends Error {
constructor(errors: ZodSuberror[]);
addError: (sub: ZodSuberror) => void;
addErrors: (subs?: ZodSuberror[]) => void;
errors: ZodSuberror[];
flatten: () => {
formErrors: string[];
fieldErrors: {
[k: string]: string[];
}
;
}
;
readonly formErrors: {
formErrors: string[];
fieldErrors: {
[k: string]: string[];
}
;
}
;
readonly isEmpty: boolean;
readonly message: string;
 
static create: (errors: ZodSuberror[]) => ZodError;
}

§Extends

§
Error
[src]

§Constructors

§
new ZodError(errors: ZodSuberror[])
[src]

§Properties

§
addError: (sub: ZodSuberror) => void
[src]
§
addErrors: (subs?: ZodSuberror[]) => void
[src]
§
flatten: () => {
formErrors: string[];
fieldErrors: {
[k: string]: string[];
}
;
}
[src]
§
formErrors: {
formErrors: string[];
fieldErrors: {
[k: string]: string[];
}
;
}
[src]
§
isEmpty: boolean
[src]
§
message: string
[src]

§Static Properties

§
create: (errors: ZodSuberror[]) => ZodError
[src]