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

x/valibot/src/validations/every/every.ts>every

The modular and type safe schema library for validating structural data 🤖
Extremely Popular
Go to Latest
function every
import { every } from "https://deno.land/x/valibot@v0.30.0/src/validations/every/every.ts";

Creates a pipeline validation action that validates the items of an array.

Type Parameters

TInput extends any[]

Parameters

requirement: (
element: TInput[number],
index: number,
array: TInput[number][],
) => boolean

The validation function.

optional
message: ErrorMessage

The error message.

Returns

A validation action.