FormData validation for TypeScript (Zod's most requested feature)
FormData validation for TypeScript (Zod's most requested feature)
I built a TypeScript validation library after getting frustrated with FormData in Remix/Next.js Server Actions. The problem: Zod (the most popular validation library) doesn't have FormData support. It's their #1 requested feature with 60+ upvotes on GitHub [1], but they haven't implemented it. So every Server Action looks like this: const name = formData.get('name') as string; const age = parseInt(formData.get('age') as string); // ... manual validation I wanted: const result = validateFormData(formData, schema); // Automatic type conversion, validation done While building this, I also added: - Partial validation (return valid data even with errors - useful for auto-save) - JSON Schema export (built-in, no external package needed) - File validation (size, MIME types) - XOR support (exactly one of these fields) Zero dependencies. 3KB. MIT licensed. GitHub: https://github.com/YOUR_USERNAME/lite-schema-check npm: npm install lite-schema-check Technical details in README. Happy to answer questions about the implementation. [1] https://github.com/colinhacks/zod/discussions (search for FormData)
Share cardActual performance
Launch Intel predictions
Analyze your own launch →Correct prediction on native model
Similar products
Fefe – Zero-hassle validation with functional TypeScript
Full feature ECS game engine for TypeScript
Paseri – Fast TypeScript validation library with a Zod-like API
TypeSchema – Universal adapter for TypeScript schema validation
Universal adapter for TypeScript schema validation
Dhi – 520x faster data validation for Python, 77x faster for TypeScript
Cerialize – Typescript serialization by annotation
Scala-ts – Scala to TypeScript compiler
JSONSchema to TypeScript compiler
DuoCode 1.0 bridges the gap between C# and TypeScript