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

x/valibot/src/index.ts>partialCheckAsync

The modular and type safe schema library for validating structural data 🤖
Go to Latest
function partialCheckAsync
import { partialCheckAsync } from "https://deno.land/x/valibot@v1.0.0-beta.4/src/index.ts";

Creates a partial check validation action.

Type Parameters

TInput extends PartialInput
TPathList extends readonly PathKeys<TInput>[]
TSelection extends DeepPickN<TInput, TPathList>

Parameters

pathList: TPathList

The selected paths.

requirement: (input: TSelection) => MaybePromise<boolean>

The validation function.

Returns

A partial check action.

Creates a partial check validation action.

Type Parameters

TInput extends PartialInput
TPathList extends readonly PathKeys<TInput>[]
TSelection extends DeepPickN<TInput, TPathList>
TMessage extends ErrorMessage<PartialCheckIssue<TSelection>> | undefined

Parameters

pathList: TPathList

The selected paths.

requirement: (input: TSelection) => MaybePromise<boolean>

The validation function.

message: TMessage

The error message.