zod-validators

Community

Secure Todo inputs with Zod validation

Authormikemikula
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Prevents Todo server actions from accepting invalid titles, priorities, or identifiers by centralizing validation so errors surface before database writes.

Core Features & Use Cases

  • Shared Schema Source: lib/validators/todo.ts holds PrioritySchema, CreateTodoSchema, and TodoIdSchema so every server action relies on the same rules.
  • Server-Safe Parsing: always use safeParse to validate unknown payloads before invoking Prisma writes or lookups, avoiding thrown exceptions.
  • Type Inference: export CreateTodoInput and TodoIdInput to keep action handlers type-safe while referencing the schema definitions.
  • Use Case: createTodo runs on user input to ensure titles meet length limits and priorities default to MEDIUM before persisting.

Quick Start

Validate incoming Todo server action payloads with CreateTodoSchema before writing to the database.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 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: zod-validators
Download link: https://github.com/mikemikula/AI-Coding-Summit-2026/archive/main.zip#zod-validators

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

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.