{"id":15509764,"url":"https://github.com/willin/hono-zod-body-validator","last_synced_at":"2026-04-28T08:37:51.579Z","repository":{"id":213948636,"uuid":"735339328","full_name":"willin/hono-zod-body-validator","owner":"willin","description":"The body validator middleware using Zod for Hono applications. ","archived":false,"fork":false,"pushed_at":"2023-12-24T17:00:15.000Z","size":116,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-13T00:27:26.834Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/willin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":"willin","custom":"https://afdian.net/@willin"}},"created_at":"2023-12-24T14:52:43.000Z","updated_at":"2024-06-24T21:49:42.000Z","dependencies_parsed_at":"2024-01-11T21:38:42.702Z","dependency_job_id":"d00b82a9-0129-4728-adce-486ba980037c","html_url":"https://github.com/willin/hono-zod-body-validator","commit_stats":null,"previous_names":["willin/hono-zod-body-validator"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/willin/hono-zod-body-validator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willin%2Fhono-zod-body-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willin%2Fhono-zod-body-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willin%2Fhono-zod-body-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willin%2Fhono-zod-body-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willin","download_url":"https://codeload.github.com/willin/hono-zod-body-validator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willin%2Fhono-zod-body-validator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32373512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"online","status_checked_at":"2026-04-28T02:00:07.250Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T09:43:47.632Z","updated_at":"2026-04-28T08:37:46.549Z","avatar_url":"https://github.com/willin.png","language":"TypeScript","funding_links":["https://github.com/sponsors/willin","https://afdian.net/@willin","https://paypal.me/willinwang"],"categories":[],"sub_categories":[],"readme":"# Zod body validator middleware for Hono\n\nThe validator middleware using [Zod](https://zod.dev) for [Hono](https://honojs.dev) applications.\nYou can write a schema with Zod and validate the incoming values.\n\n## Usage\n\n```ts\nimport { z } from 'zod';\nimport { zBodyValidator } from '@hono-dev/zod-body-validator';\n\nconst schema = z.object({\n  name: z.string(),\n  age: z.number()\n});\n\napp.post('/author', zBodyValidator(schema), (c) =\u003e {\n  const data = c.req.valid('form');\n  return c.json({\n    success: true,\n    message: `${data.name} is ${data.age}`\n  });\n});\n```\n\nHook:\n\n```ts\napp.post(\n  '/post',\n  zBodyValidator(schema, (result, c) =\u003e {\n    if (!result.success) {\n      return c.text('Invalid!', 400);\n    }\n  })\n  //...\n);\n```\n\n## 赞助 Sponsor\n\n维护者 Owner： [Willin Wang](https://willin.wang)\n\n如果您对本项目感兴趣，可以通过以下方式支持我：\n\n- 关注我的 Github 账号：[@willin](https://github.com/willin) [![github](https://img.shields.io/github/followers/willin.svg?style=social\u0026label=Followers)](https://github.com/willin)\n- 参与 [爱发电](https://afdian.net/@willin) 计划\n- 支付宝或微信[扫码打赏](https://user-images.githubusercontent.com/1890238/89126156-0f3eeb80-d516-11ea-9046-5a3a5d59b86b.png)\n\nDonation ways:\n\n- Github: \u003chttps://github.com/sponsors/willin\u003e\n- Paypal: \u003chttps://paypal.me/willinwang\u003e\n- Alipay or Wechat Pay: [QRCode](https://user-images.githubusercontent.com/1890238/89126156-0f3eeb80-d516-11ea-9046-5a3a5d59b86b.png)\n\n## 许可证 License\n\nApache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillin%2Fhono-zod-body-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillin%2Fhono-zod-body-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillin%2Fhono-zod-body-validator/lists"}