Skip to main content
Module

x/oridune_validator/mod.ts>ObjectValidator

A powerful typescript compatible/zod alternative schema validator.
Go to Latest
class ObjectValidator
Re-export
import { ObjectValidator } from "https://deno.land/x/oridune_validator@v0.2.25/mod.ts";

Constructors

new
ObjectValidator(shape: Type, options?: IObjectValidatorOptions)

Type Parameters

Type extends object
Input
Output

Properties

protected
Options: IObjectValidatorOptions
protected
optional
RestValidator: BaseValidator<any, any, any>
protected
Shape: Type

Methods

protected
_toJSON(_options?: IJSONSchemaOptions)
protected
_toSample(_options?: ISampleDataOptions)
extends<V extends ObjectValidator<any, any, any>, I = V extends ObjectValidator<any, infer R, any> ? R : never, O = V extends ObjectValidator<any, any, infer R> ? R : never>(validator: V): ObjectValidator<Type, Omit<Input, keyof I> & I, Omit<Output, keyof O> & O>
rest<V extends BaseValidator<any, any, any>, I = inferInput<V>, O = inferOutput<V>>(validator: V): ObjectValidator<Type, Input & Partial<{ [K: string]: I; }>, Output & Partial<{ [K: string]: O; }>>