/Knowledge/sources/honojs__hono/llms-full/validation-standard-schema-validator-middleware-with-valibot--280d753e6928.md
Validation: Standard Schema Validator Middleware > With Valibot - hon...
Validation: Standard Schema Validator Middleware With Valibot Source evidence: /Sources/honojs hono/provenance.md Canonical citation: https://hono.dev/llms f...
Validation: Standard Schema Validator Middleware > With Valibot
Source evidence: /Sources/honojs__hono/provenance.md Canonical citation: https://hono.dev/llms-full.txt#with-valibot
Summary
Valibot is a lightweight alternative to Zod with a modular design: ::: code-group sh [npm] npm i valibot sh [yarn] yarn add valibot sh [pnpm] pnpm add valibot sh [bun] bun add valibot :...
Content
Valibot is a lightweight alternative to Zod with a modular design:
::: code-group
npm i valibot
yarn add valibot
pnpm add valibot
bun add valibot
:::
import * as v from 'valibot'
import { sValidator } from '@hono/standard-validator'
const schema = v.object({
name: v.string(),
age: v.number(),
})
app.post('/author', sValidator('json', schema), (c) => {
const data = c.req.valid('json')
return c.json({
success: true,
message: `${data.name} is ${data.age}`,
})
})
Metadata
{
"chunk_index": 0,
"citation": "https://hono.dev/llms-full.txt#with-valibot",
"coverage_role": "overview",
"qualified_title": "Hono / llms-full / Validation > Standard Schema Validator Middleware > With Valibot",
"retrieved_at": "2026-07-02T05:51:01Z",
"section_index": 107,
"source_id": "/honojs/hono",
"source_type": "llms_full",
"target_label": "llms-full",
"title": "Validation: Standard Schema Validator Middleware > With Valibot",
"upstream_url": "https://hono.dev/llms-full.txt",
"version": "2026"
}