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

x/valibot/src/methods/index.ts>merge

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

Merges the entries of multiple object schemas. Subsequent object entries overwrite the previous ones.

Type Parameters

TSchemas extends ObjectSchemas

Parameters

schemas: TSchemas

The schemas to be merged.

optional
pipe: Pipe<ObjectOutput<MergeObjects<TSchemas>, undefined>>

A validation and transformation pipe.

Merges the entries of multiple object schemas. Subsequent object entries overwrite the previous ones.

Type Parameters

TSchemas extends ObjectSchemas

Parameters

schemas: TSchemas

The schemas to be merged.

optional
message: ErrorMessage

The error message.

optional
pipe: Pipe<ObjectOutput<MergeObjects<TSchemas>, undefined>>

A validation and transformation pipe.

Merges the entries of multiple object schemas. Subsequent object entries overwrite the previous ones.

Type Parameters

TSchemas extends ObjectSchemas
TRest extends BaseSchema | undefined

Parameters

schemas: TSchemas

The schemas to be merged.

rest: TRest

The object rest.

A validation and transformation pipe.

Merges the entries of multiple object schemas. Subsequent object entries overwrite the previous ones.

Type Parameters

TSchemas extends ObjectSchemas
TRest extends BaseSchema | undefined

Parameters

schemas: TSchemas

The schemas to be merged.

rest: TRest

The object rest.

optional
message: ErrorMessage

The error message.

A validation and transformation pipe.