veta-forms-validation
CommunityBuild safe forms with correct Zod validation.
Authormarcogonzalo
Version1.0.0
Installs0
System Documentation
What problem does it solve?
It prevents form errors and broken UX by ensuring react-hook-form fields validate correctly with Zod, including safe handling of optional Select values in the Veta app.
Core Features & Use Cases
- Zod-powered schema validation: Define a Zod schema and wire it into react-hook-form using zodResolver for consistent validation rules across the form.
- Correct defaultValues for optional fields: Use undefined (not empty strings) in defaultValues to avoid accidental “selected” states and validation mismatches.
- Shadcn/Radix Select compliance rule: Avoid value="" on SelectItem and convert empty values to undefined for optional selections to ensure Radix Select semantics stay correct.
- Consistent form UI components: Use the shared Form, FormField, FormItem, FormControl, and FormMessage components for standardized layout and error rendering.
Quick Start
Create a Zod schema for your form, pass it to useForm via zodResolver, and update your Shadcn Select to map empty selections to undefined while using the shared Form components for field rendering.
Dependency Matrix
Required Modules
None requiredComponents
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: veta-forms-validation Download link: https://github.com/marcogonzalo/studio-manager/archive/main.zip#veta-forms-validation Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.