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

x/valibot/src/actions/maxBytes/maxBytes.ts>maxBytes

The modular and type safe schema library for validating structural data 🤖
Go to Latest
function maxBytes
import { maxBytes } from "https://deno.land/x/valibot@v0.1.0-to-json-schema/src/actions/maxBytes/maxBytes.ts";

Creates a max bytes validation action.

Type Parameters

TInput extends string
TRequirement extends number

Parameters

requirement: TRequirement

The maximum bytes.

Returns

A max bytes action.

Creates a max bytes validation action.

Type Parameters

TInput extends string
TRequirement extends number
TMessage extends ErrorMessage<MaxBytesIssue<TInput, TRequirement>> | undefined

Parameters

requirement: TRequirement

The maximum bytes.

message: TMessage

The error message.