Module

x/hono/mod.ts>validator

Web Framework built on Web Standards
Extremely Popular
Go to Latest
variable validator
import { validator } from "https://dotland.deno.dev/x/hono@v4.2.6/mod.ts";

type

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