Zod 3.x Error Formatter

Formats zod 3.x error in human readable format

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greasyfork.org/scripts/565798/1752557/Zod%203x%20Error%20Formatter.js

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Author
NotYou
Version
1.1.0
Created
2026-02-10
Updated
2026-02-10
Size
2.79 KB
License
MIT

Zod 3.x Error Formatter

Description:

Formats zod 3.x error in human readable format

Static Methods

format(zodError: InstanceType<typeof z.ZodError> | { issues: { code: string, message: string }[], isEmpty: boolean }): string

Formats zod error or zod error like object

const zodError = z.string().safeParse(Number()).error

const readableError = ZodErrorFormatter.format(zodError)

console.error(readableError)