shadcn-agents-form-validator

Validates shadcn Form components using zod schema and react-hook-form wiring rules.

Updated May 19, 2026
One-click install
npx skills add https://github.com/Impertio-Studio/shadcn-ui-Claude-Skill-Package --skill shadcn-agents-form-validator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shadcn-agents-form-validator
Source: https://github.com/Impertio-Studio/shadcn-ui-Claude-Skill-Package/tree/main/skills/source/shadcn-agents/shadcn-agents-form-validator
Command: npx skills add https://github.com/Impertio-Studio/shadcn-ui-Claude-Skill-Package --skill shadcn-agents-form-validator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents silent form failures where react-hook-form, zod validation, and shadcn Form wiring disagree—so users see no errors and submissions contain undefined or invalid values.

Core Features & Use Cases

  • Eight-point integration audit: validates schema-to-FormField name mapping, Controller-vs-register correctness, FormMessage presence, exact name matching, defaultValues completeness, handleSubmit wrapping, zodResolver wiring, and absence of nested FormProvider.
  • Deterministic verdict for code reviews: parses a provided form code block and emits a structured pass/fail report identifying which rule fails and the exact fix to apply.
  • Debugging for common “it compiles but breaks” reports: targets scenarios like Select/Checkbox/Switch/RadioGroup not binding, validation not triggering, uncontrolled-to-controlled warnings, duplicated form contexts, and missing error rendering.

Quick Start

Ask the validator to review your React form code and produce the structured verdict showing every failing checkpoint and the canonical fix.

Frequently Asked Questions about shadcn-agents-form-validator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does my shadcn ui form submit undefined values when using react-hook-form and zod?

shadcn ui forms submit undefined values when react-hook-form and zod disagree on schema paths, missing defaultValues, or broken zodResolver wiring. Auditing the JSX Form tree against the zod schema identifies exact field name mismatches causing empty submissions.

How do I fix validation not triggering on my shadcn Form components?

To fix validation not triggering, verify zodResolver is correctly wired to useForm and that FormField names exactly match zod schema paths. An eight-point integration audit detects missing handleSubmit wrapping or Controller bindings that silently break validation.

When should I use Controller vs register with shadcn ui form elements?

Use Controller vs register based on whether the shadcn ui component is controlled, such as Select, Checkbox, Switch, or RadioGroup. Checking Controller-vs-register correctness prevents uncontrolled-to-controlled warnings and ensures form values properly bind to react-hook-form.

Does my react-hook-form setup need defaultValues for every zod schema field?

Your react-hook-form setup requires defaultValues for every zod schema field to prevent undefined submission values. Checking defaultValues completeness ensures the resolver initializes all form paths correctly and prevents silent validation skips.

What is the best way to audit AI-generated react-hook-form and zod code?

The best way to audit AI-generated react-hook-form and zod code is parsing the JSX Form tree and zod schema to run a deterministic eight-point checklist. This produces a structured pass/fail verdict with canonical fixes for missing FormMessage or duplicated FormProvider contexts.