[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-71309":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":34,"readmeContent":35,"aiSummary":36,"trendingCount":16,"starSnapshotCount":16,"syncStatus":37,"lastSyncTime":38,"discoverSource":39},71309,"valibot","open-circle\u002Fvalibot","open-circle","The modular and type safe schema library for validating structural data 🤖","https:\u002F\u002Fvalibot.dev",null,"TypeScript",8745,336,21,71,0,6,11,122,18,38.58,"MIT License",false,"main",[26,27,28,29,30,31,32,33],"bundle-size","modular","parsing","runtime","schema","type-safe","typescript","validation","2026-06-12 02:02:50","![Valibot Logo](https:\u002F\u002Fgithub.com\u002Fopen-circle\u002Fvalibot\u002Fblob\u002Fmain\u002Fvalibot.jpg?raw=true)\n\n# Valibot\n\n[![License: MIT][license-image]][license-url]\n[![CI][ci-image]][ci-url]\n[![NPM version][npm-image]][npm-url]\n[![Downloads][downloads-image]][npm-url]\n[![JSR version][jsr-image]][jsr-url]\n[![Discord][discord-image]][discord-url]\n\nHello, I am Valibot and I would like to help you validate data easily using a schema. No matter if it is incoming data on a server, a form or even configuration files. I have no dependencies and can run in any JavaScript environment.\n\n> I highly recommend you read the [announcement post](https:\u002F\u002Fwww.builder.io\u002Fblog\u002Fintroducing-valibot), and if you are a nerd like me, the [bachelor's thesis](https:\u002F\u002Fvalibot.dev\u002Fthesis.pdf) I am based on.\n\n## Highlights\n\n- Fully type safe with static type inference\n- Small bundle size starting at less than 700 bytes\n- Validate everything from strings to complex objects\n- Open source and fully tested with 100 % coverage\n- Many transformation and validation actions included\n- Well structured source code without dependencies\n- Minimal, readable and well thought out API\n\n## Example\n\nFirst you create a schema that describes a structured data set. A schema can be compared to a type definition in TypeScript. The big difference is that TypeScript types are \"not executed\" and are more or less a DX feature. A schema on the other hand, apart from the inferred type definition, can also be executed at runtime to guarantee the type safety of unknown data.\n\n\u003C!-- prettier-ignore -->\n```ts\nimport * as v from 'valibot'; \u002F\u002F 1.31 kB\n\n\u002F\u002F Create login schema with email and password\nconst LoginSchema = v.object({\n  email: v.pipe(v.string(), v.email()),\n  password: v.pipe(v.string(), v.minLength(8)),\n});\n\n\u002F\u002F Infer output TypeScript type of login schema as\n\u002F\u002F { email: string; password: string }\ntype LoginData = v.InferOutput\u003Ctypeof LoginSchema>;\n\n\u002F\u002F Throws error for email and password\nconst output1 = v.parse(LoginSchema, { email: '', password: '' });\n\n\u002F\u002F Returns data as { email: string; password: string }\nconst output2 = v.parse(LoginSchema, {\n  email: 'jane@example.com',\n  password: '12345678',\n});\n```\n\nApart from `parse` I also offer a non-exception-based API with `safeParse` and a type guard function with `is`. You can read more about it [here](https:\u002F\u002Fvalibot.dev\u002Fguides\u002Fparse-data\u002F).\n\n## Comparison\n\nInstead of relying on a few large functions with many methods, my API design and source code is based on many small and independent functions, each with just a single task. This modular design has several advantages.\n\nFor example, this allows a bundler to use the import statements to remove code that is not needed. This way, only the code that is actually used gets into your production build. This can reduce the bundle size by up to 95 % compared to [Zod](https:\u002F\u002Fzod.dev\u002F).\n\nIn addition, it allows you to easily extend my functionality with external code and makes my source code more robust and secure because the functionality of the individual functions can be tested much more easily through unit tests.\n\n> Coming from [Zod](https:\u002F\u002Fzod.dev\u002F)? Read our [migration article](https:\u002F\u002Fvalibot.dev\u002Fblog\u002Fwhy-migrate-to-valibot\u002F) to see the benefits of Valibot, and use our [migration guide](https:\u002F\u002Fvalibot.dev\u002Fguides\u002Fmigrate-from-zod\u002F) to migrate your schemas with confidence.\n\n## Partners\n\nThanks to our partners who support my development! [Join them](https:\u002F\u002Fgithub.com\u002Fsponsors\u002Ffabian-hiller) and contribute to the sustainability of open source software!\n\n![Partners of Valibot](https:\u002F\u002Fgithub.com\u002Fopen-circle\u002Fvalibot\u002Fblob\u002Fmain\u002Fpartners.webp?raw=true)\n\n## Credits\n\nMy friend [Fabian](https:\u002F\u002Fgithub.com\u002Ffabian-hiller) created me as part of his [bachelor thesis](https:\u002F\u002Fvalibot.dev\u002Fthesis.pdf) at [Stuttgart Media University](https:\u002F\u002Fwww.hdm-stuttgart.de\u002Fen\u002F), supervised by Walter Kriha, [Miško Hevery](https:\u002F\u002Fgithub.com\u002Fmhevery) and [Ryan Carniato](https:\u002F\u002Fgithub.com\u002Fryansolid). My role models also include [Colin McDonnell](https:\u002F\u002Fgithub.com\u002Fcolinhacks), who had a big influence on my API design with [Zod](https:\u002F\u002Fzod.dev\u002F).\n\n## Feedback\n\nFind a bug or have an idea how to improve my code? Please fill out an [issue](https:\u002F\u002Fgithub.com\u002Fopen-circle\u002Fvalibot\u002Fissues\u002Fnew). Together we can make the library even better!\n\n## License\n\nI am completely free and licensed under the [MIT license](https:\u002F\u002Fgithub.com\u002Fopen-circle\u002Fvalibot\u002Fblob\u002Fmain\u002FLICENSE.md). But if you like, you can feed me with a star on [GitHub](https:\u002F\u002Fgithub.com\u002Fopen-circle\u002Fvalibot).\n\n[license-image]: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-brightgreen.svg?style=flat-square\n[license-url]: https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT\n[ci-image]: https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Fopen-circle\u002Fvalibot\u002Fci.yml?branch=main&logo=github&style=flat-square\n[ci-url]: https:\u002F\u002Fgithub.com\u002Fopen-circle\u002Fvalibot\u002Factions\u002Fworkflows\u002Fci.yml\n[npm-image]: https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fvalibot.svg?style=flat-square\n[npm-url]: https:\u002F\u002Fnpmjs.org\u002Fpackage\u002Fvalibot\n[downloads-image]: https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fdm\u002Fvalibot.svg?style=flat-square\n[jsr-image]: https:\u002F\u002Fjsr.io\u002Fbadges\u002F@valibot\u002Fvalibot?style=flat-square\n[jsr-url]: https:\u002F\u002Fjsr.io\u002F@valibot\u002Fvalibot\n[discord-image]: https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F1252985447273992222?label=Discord&style=flat-square\n[discord-url]: https:\u002F\u002Fdiscord.gg\u002FtkMjQACf2P\n","Valibot 是一个用于验证结构化数据的模块化且类型安全的模式库。它使用 TypeScript 编写，提供了完全类型安全的静态类型推断，并且具有小于 700 字节的小体积包大小。Valibot 支持从字符串到复杂对象的各种数据验证，同时包含许多转换和验证动作。其设计基于多个小而独立的功能函数，每个函数仅执行单一任务，这样的模块化设计不仅使得代码更加健壮和易于扩展，还能通过移除未使用的代码来显著减小最终生产构建的体积。适用于需要对输入数据、表单或配置文件进行验证的各种 JavaScript 环境中，确保数据的安全性和准确性。",2,"2026-06-11 03:37:06","high_star"]