<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/there-are-too-many-javascript-schema-libraries-so-support-only-one-4wc9ltcla" -->

---
title: There are too many JavaScript schema libraries, so...
description: Standard Schema is a narrow compatibility interface that many TypeScript schema libraries (Zod, Valibot, ArkType, Yup, Joi) already implement, letting library...
canonical: https://daily.dev/posts/there-are-too-many-javascript-schema-libraries-so-support-only-one-4wc9ltcla
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: There are too many JavaScript schema libraries, so support only one | daily.dev
og:description: Standard Schema is a narrow compatibility interface that many TypeScript schema libraries (Zod, Valibot, ArkType, Yup, Joi) already implement, letting library...
og:url: https://daily.dev/posts/there-are-too-many-javascript-schema-libraries-so-support-only-one-4wc9ltcla
og:image: https://api.daily.dev/og/posts/4wc9LTClA.png
og:image:alt: There are too many JavaScript schema libraries, so support only one
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# There are too many JavaScript schema libraries, so support only one

**[Inngest Blog](https://daily.dev/sources/inngest)** · 9 min read · 0 upvotes · 0 comments

## Summary

Standard Schema is a narrow compatibility interface that many TypeScript schema libraries (Zod, Valibot, ArkType, Yup, Joi) already implement, letting library authors accept any of them without writing per-library adapters. Inngest adopted it in their TypeScript SDK v4.0 and share lessons: it enables no-op static-type-only schemas, but transforms can break producer/consumer double validation because input and output types can differ; validators can be sync or async and can still throw despite the result-based signature; routing multiple schemas requires discriminator or union strategies; and the real integration cost lies in threading types through a public API, not in the runtime validation call itself.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.inngest.com/blog/too-many-javascript-schema-libraries-support-only-one>

## Questions this post answers

### What is Standard Schema and why would a library author use it instead of picking Zod or another validator directly?

Standard Schema is a small compatibility interface, exposed as a `~standard` property on a schema object, that many TypeScript schema libraries already implement, including Zod, Valibot, ArkType, Yup, and Joi. Library authors can accept `StandardSchemaV1` and support every implementing library without writing per-library adapters, since it standardizes only validation and type inference, not error formatting, defaults, or introspection.

_Teams deciding how to support multiple validation libraries can find integration write-ups like this one on daily.dev._

### Why can validating the same Standard Schema twice on producer and consumer sides fail even though the data wasn't corrupted?

Some schemas use transforms that change the value's shape during validation, so the producer's validated output can fail the consumer's validation against the same schema. For example, a schema transforming a string into a number leaves the payload as a number after producer-side validation, causing the consumer's validation (expecting the original string shape) to fail. Standard Schema exposes this via differing Input and Output types, letting consumers detect and reject transform-bearing schemas at compile time.

_Anyone building event-driven systems with shared validation schemas can track pitfalls like this via daily.dev._

### How do you handle multiple possible schemas at a single validation entry point with Standard Schema?

Use either a discriminator field to pick exactly one schema based on a known property (giving precise errors with minimal work) or a union approach that tries every plausible schema and accepts the input if any pass (useful when no clean discriminator exists, though failures are harder to explain). Inngest uses event names as discriminators and validates matching candidate schemas in parallel via Promise.allSettled, rejecting only if all candidates fail.

_Developers designing multi-schema validation routing can compare approaches like these through daily.dev._

## Similar posts on daily.dev

- [Zod \+ TypeScript: Schema Validation Made Easy – Frontend Masters Blog](https://daily.dev/posts/zod-typescript-schema-validation-made-easy-frontend-masters-blog-yv5epna6v) · Frontend Masters · 0 upvotes · 0 comments
- [Building Type-Safe APIs with itty-spec: A Contract-First Approach](https://daily.dev/posts/building-type-safe-apis-with-itty-spec-a-contract-first-approach-zmpai9qdb) · DEV · 2 upvotes · 0 comments
- [Stop fighting forms: The schema-driven approach to validation](https://daily.dev/posts/stop-fighting-forms-the-schema-driven-approach-to-validation-8vq511w0o) · LogRocket · 1 upvotes · 0 comments
- [How to Build Type-Safe APIs with Hono and Zod](https://daily.dev/posts/how-to-build-type-safe-apis-with-hono-and-zod-0aku3long) · freeCodeCamp · 1 upvotes · 0 comments

---

Tags: [#typescript](https://daily.dev/tags/typescript), [#zod](https://daily.dev/tags/zod)

[View this post on daily.dev](https://daily.dev/posts/there-are-too-many-javascript-schema-libraries-so-support-only-one-4wc9ltcla)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"There are too many JavaScript schema libraries, so support only one","url":"https://daily.dev/posts/there-are-too-many-javascript-schema-libraries-so-support-only-one-4wc9ltcla","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/there-are-too-many-javascript-schema-libraries-so-support-only-one-4wc9ltcla"},"datePublished":"2026-09-13T19:57:22.278Z","dateModified":"2026-09-13T20:00:53.339Z","description":"Standard Schema is a narrow compatibility interface that many TypeScript schema libraries (Zod, Valibot, ArkType, Yup, Joi) already implement, letting library...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/afbd59ad25ebdf29dad9501ce25a92cd?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/afbd59ad25ebdf29dad9501ce25a92cd?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Inngest Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Inngest Blog","logo":"https://media.daily.dev/image/upload/s--ieZKUa5y--/c_limit,w_256/f_auto,q_auto/v1789329423/logos/inngest?_a=BAMAMicg0","url":"https://daily.dev/sources/inngest"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/there-are-too-many-javascript-schema-libraries-so-support-only-one-4wc9ltcla","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"typescript,zod","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Inngest Blog","item":"https://daily.dev/sources/inngest"},{"@type":"ListItem","position":3,"name":"There are too many JavaScript schema libraries, so support only one"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/there-are-too-many-javascript-schema-libraries-so-support-only-one-4wc9ltcla#faq","mainEntity":[{"@type":"Question","name":"What is Standard Schema and why would a library author use it instead of picking Zod or another validator directly?","acceptedAnswer":{"@type":"Answer","text":"Standard Schema is a small compatibility interface, exposed as a `~standard` property on a schema object, that many TypeScript schema libraries already implement, including Zod, Valibot, ArkType, Yup, and Joi. Library authors can accept `StandardSchemaV1` and support every implementing library without writing per-library adapters, since it standardizes only validation and type inference, not error formatting, defaults, or introspection. Teams deciding how to support multiple validation libraries can find integration write-ups like this one on daily.dev."}},{"@type":"Question","name":"Why can validating the same Standard Schema twice on producer and consumer sides fail even though the data wasn't corrupted?","acceptedAnswer":{"@type":"Answer","text":"Some schemas use transforms that change the value's shape during validation, so the producer's validated output can fail the consumer's validation against the same schema. For example, a schema transforming a string into a number leaves the payload as a number after producer-side validation, causing the consumer's validation (expecting the original string shape) to fail. Standard Schema exposes this via differing Input and Output types, letting consumers detect and reject transform-bearing schemas at compile time. Anyone building event-driven systems with shared validation schemas can track pitfalls like this via daily.dev."}},{"@type":"Question","name":"How do you handle multiple possible schemas at a single validation entry point with Standard Schema?","acceptedAnswer":{"@type":"Answer","text":"Use either a discriminator field to pick exactly one schema based on a known property (giving precise errors with minimal work) or a union approach that tries every plausible schema and accepts the input if any pass (useful when no clean discriminator exists, though failures are harder to explain). Inngest uses event names as discriminators and validates matching candidate schemas in parallel via Promise.allSettled, rejecting only if all candidates fail. Developers designing multi-schema validation routing can compare approaches like these through daily.dev."}}]}
```

