hono icon indicating copy to clipboard operation
hono copied to clipboard

Output validator

Open Micnubinub opened this issue 4 months ago • 3 comments

What is the feature you are proposing?

*Maybe better suited for next big update A feature to validate the output thats going out to the client... i.e. if you have object({ name: string(), age: int() }) and you send out the wrong structure it errors out, or if you send out email as one of the fields in the object it is removed

Micnubinub avatar Aug 28 '25 02:08 Micnubinub

Hi @Micnubinub

Is your suggestion like these?

  • https://github.com/honojs/middleware/pull/184
  • https://github.com/honojs/hono/issues/2439

yusukebe avatar Aug 28 '25 06:08 yusukebe

@yusukebe yea, like that... A response validator

Micnubinub avatar Aug 28 '25 10:08 Micnubinub

Hi @yusukebe . I'm wondering if the https://github.com/honojs/middleware/pull/184 will be managed? Or is ok if I open PR for this feature?

kaungmyatlwin avatar Sep 01 '25 09:09 kaungmyatlwin