Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/hono/validator/validator.ts>validator

Fast, Lightweight, Web-standards
Extremely Popular
Go to Latest
variable validator
import { validator } from "https://deno.land/x/hono@v4.0.0-rc.3/validator/validator.ts";

type

<InputType, P extends string, M extends string, U extends ValidationTargetByMethod<M>, OutputType = ValidationTargets[U], P2 extends string = P, V extends { in: [K in U]: unknown extends InputType ? OutputType : InputType; out: [K in U]: ExcludeResponseType<OutputType>; } = { in: [K in U]: unknown extends InputType ? OutputType : InputType; out: [K in U]: ExcludeResponseType<OutputType>; }, E extends Env = any>(target: U, validationFunc: ValidationFunction<unknown extends InputType ? ValidationTargets[U] : InputType, OutputType, E, P2>) => MiddlewareHandler<E, P, V>