Request Validation
CommunityEnforce type-safe API and video data validation.
Authorchad3814
Version1.0.0
Installs0
System Documentation
What problem does it solve?
TypeScript-based input validation for API requests and video data structures. Use this when validating request bodies in Express handlers, implementing type guards, or validating RenderRequest and RecapBook data. Ensures type safety at API boundaries.
Core Features & Use Cases
- TypeScript Type Guards: Use TypeScript types and type guards for compile-time and runtime validation
- Server-Side Validation: All API endpoints must validate request bodies against defined types
- Fail Early: Validate input at API boundary; reject invalid requests before processing
- Specific Error Messages: Return clear, field-specific errors: { error: 'Invalid month', field: 'month' }
- Request Body Validation: Validate RenderRequest fields (month 1-12, year valid, books array structure)
- Type Safety: Define interfaces in src/lib/types.ts and enforce at API boundaries
- Business Rule Validation: Validate video constraints (frame counts, durations, book data completeness)
- No Client-Side Validation: This is a server-to-server API; all validation happens server-side
Quick Start
Validate a sample RenderRequest payload against the defined types to verify server-side validation behavior.
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: Request Validation Download link: https://github.com/chad3814/cawpile-video-gen/archive/main.zip#request-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 223,000+ vetted skills library on demand.