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

x/valibot/src/index.ts>multipleOf

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

Creates a multiple of validation action.

Type Parameters

TInput extends number
TRequirement extends number

Parameters

requirement: TRequirement

The divisor.

Returns

A multiple of action.

Creates a multiple of validation action.

Type Parameters

TInput extends number
TRequirement extends number
TMessage extends ErrorMessage<MultipleOfIssue<TInput, TRequirement>> | undefined

Parameters

requirement: TRequirement

The divisor.

message: TMessage

The error message.