Fo

FormData validation for TypeScript (Zod's most requested feature)

Hacker News

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 card

Actual performance

1points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
62%62% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntUnlikely to reach the leaderboard · Strong signals: user · Missing: mac, agents, macos
47%47% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
35%35% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
33%33% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Hacker NewsMay not resonate with HN audience · Strong signals: io · Missing: https docs, excited, just released
26%26% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
16%16% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Fe
Fefe – Zero-hassle validation with functional TypeScript39%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Fefe – Zero-hassle validation with functional TypeScript

Hacker News4
Fu
Full feature ECS game engine for TypeScript66%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Full feature ECS game engine for TypeScript

Hacker News3
Pa
Paseri – Fast TypeScript validation library with a Zod-like API46%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Paseri – Fast TypeScript validation library with a Zod-like API

Hacker News1
Ty
TypeSchema – Universal adapter for TypeScript schema validation38%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

TypeSchema – Universal adapter for TypeScript schema validation

Hacker News2
Un
Universal adapter for TypeScript schema validation38%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Universal adapter for TypeScript schema validation

Hacker News2
Dh
Dhi – 520x faster data validation for Python, 77x faster for TypeScript37%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Dhi – 520x faster data validation for Python, 77x faster for TypeScript

Hacker News5
Ce
Cerialize – Typescript serialization by annotation39%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Cerialize – Typescript serialization by annotation

Hacker News1
Sc
Scala-ts – Scala to TypeScript compiler41%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Scala-ts – Scala to TypeScript compiler

Hacker News66
JS
JSONSchema to TypeScript compiler51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

JSONSchema to TypeScript compiler

Hacker News72
Du
DuoCode 1.0 bridges the gap between C# and TypeScript31%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

DuoCode 1.0 bridges the gap between C# and TypeScript

Hacker News7