---
title: "Should we change Valibot's API?"
url: https://daily.dev/posts/should-we-change-valibot-s-api--vi2dv2iap
source_url: https://valibot.dev/blog/should-we-change-valibots-api
type: article
source: "Valibot: The modular and type safe schema library"
published: 2026-08-23T12:23:40.527Z
updated: 2026-08-23T12:50:40.092Z
tags: ["open-source", "architecture", "typescript"]
reading_time: 5
upvotes: 0
comments: 0
language: 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.

# Should we change Valibot's API?

**[Valibot: The modular and type safe schema library](https://daily.dev/sources/valibot)** · 5 min read · 0 upvotes · 0 comments

## Summary

Valibot's creator proposes a redesign of the library's API ahead of its v1 release, replacing the current pipeline argument approach with a new pipe function. The change addresses pain points like non-modular pipelines increasing bundle size, confusing nesting when combining transform and brand methods, and limited control over input/output types. The post lays out code comparisons of old vs new syntax, advantages (smaller bundle size, type transformation support, a future metadata feature), disadvantages (more verbose code for medium schemas, potential nested pipelines), and invites community feedback on naming and design before finalizing the v1 API.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://valibot.dev/blog/should-we-change-valibots-api>

## Questions this post answers

### How does Valibot's proposed pipe function differ from the current pipeline argument syntax?

The pipe function takes a schema as its first argument followed by validation, transformation, or branding actions, replacing the array-based pipeline argument like string([toTrimmed(), email()]) with pipe(string(), toTrimmed(), email()). Unlike the current pipeline, pipe also supports changing the data type mid-chain, letting transform and brand live inside the pipeline instead of wrapping the schema, which reduces function nesting and simplifies the schemas, methods, and actions mental model.

_Developers weighing a Valibot API migration can track how libraries evolve their validation patterns on daily.dev._

### Why does Valibot's current pipeline implementation increase bundle size for simple schemas?

The current pipeline implementation is not modular, which adds over 200 bytes to the bundle size of a simple string schema, accounting for almost 30% of that schema's total size. Because the pipeline logic is bundled even when unused features aren't needed, the design forces extra overhead onto minimal schemas that don't require validations or transformations.

_Bundle-size tradeoffs in validation libraries are the kind of detail teams compare on daily.dev before picking a tool._

---

Tags: [#open-source](https://daily.dev/tags/open-source), [#architecture](https://daily.dev/tags/architecture), [#typescript](https://daily.dev/tags/typescript)

[View this post on daily.dev](https://daily.dev/posts/should-we-change-valibot-s-api--vi2dv2iap)
