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

x/valibot/src/schemas/index.ts>record

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

Creates a record schema.

Parameters

value: TValue

The value schema.

A validation and transformation pipe.

Creates a record schema.

Parameters

value: TValue

The value schema.

optional
message: ErrorMessage

The error message.

A validation and transformation pipe.

Creates a record schema.

Type Parameters

TKey extends RecordKey
TValue extends BaseSchema

Parameters

key: TKey

The key schema.

value: TValue

The value schema.

optional
pipe: Pipe<RecordOutput<TKey, TValue>>

A validation and transformation pipe.

Returns

A record schema.

Creates a record schema.

Type Parameters

TKey extends RecordKey
TValue extends BaseSchema

Parameters

key: TKey

The key schema.

value: TValue

The value schema.

optional
message: ErrorMessage

The error message.

optional
pipe: Pipe<RecordOutput<TKey, TValue>>

A validation and transformation pipe.

Returns

A record schema.