Skip to main content
Module

x/valibot/src/actions/partialCheck/index.ts>partialCheck

The modular and type safe schema library for validating structural data 🤖
Extremely Popular
Latest
function partialCheck
import { partialCheck } from "https://deno.land/x/valibot@v0.2.0-to-json-schema/src/actions/partialCheck/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) => 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) => boolean

The validation function.

message: TMessage

The error message.