customizing-errors

Community

Unified error API for Zod with custom messages

Authordjankies
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Unifies error customization under a single error parameter, enabling consistent UX across forms and UI.

Core Features & Use Cases

  • Unified error parameter: replace multiple deprecated options with a single error field.
  • Error maps and messages: define global maps or field-specific messages.
  • Use Case: display friendly validation errors in a React form.

Quick Start

Apply z.string({ error: "Required" }) on a field; safely parse and handle result with safeParse.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: customizing-errors
Download link: https://github.com/djankies/claude-configs/archive/main.zip#customizing-errors

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository