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

x/valibot/mod.ts>recordAsync

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

Creates an async record schema.

Type Parameters

TValue extends BaseSchema | BaseSchemaAsync

Parameters

value: TValue

The value schema.

optional
pipe: PipeAsync<RecordOutput<StringSchema, TValue>>

A validation and transformation pipe.

Returns

RecordSchemaAsync<StringSchema, TValue>

An async record schema.

Creates an async record schema.

Type Parameters

TValue extends BaseSchema | BaseSchemaAsync

Parameters

value: TValue

The value schema.

optional
message: ErrorMessage

The error message.

optional
pipe: PipeAsync<RecordOutput<StringSchema, TValue>>

A validation and transformation pipe.

Returns

RecordSchemaAsync<StringSchema, TValue>

An async record schema.

Creates an async record schema.

Type Parameters

TKey extends RecordKeyAsync
TValue extends BaseSchema | BaseSchemaAsync

Parameters

key: TKey

The key schema.

value: TValue

The value schema.

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

A validation and transformation pipe.

Returns

RecordSchemaAsync<TKey, TValue>

An async record schema.

Creates an async record schema.

Type Parameters

TKey extends RecordKeyAsync
TValue extends BaseSchema | BaseSchemaAsync

Parameters

key: TKey

The key schema.

value: TValue

The value schema.

optional
message: ErrorMessage

The error message.

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

A validation and transformation pipe.

Returns

RecordSchemaAsync<TKey, TValue>

An async record schema.