Skip to main content
Module

x/oridune_validator/mod.ts>TupleValidator

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

Constructors

new
TupleValidator(validators: Type[], options?: ITupleValidatorOptions)

Type Parameters

Type extends Array<any>
Input
Output

Properties

protected
MaxLength: number
protected
MinLength: number
protected
Options: ITupleValidatorOptions
protected
optional
Validator: BaseValidator<any, any, any>
protected
Validators: BaseValidator<any, any, any>[]

Methods

protected
_toJSON(_options?: IJSONSchemaOptions)
protected
_toSample(options?: ISampleDataOptions)
length(options: { min?: number; max?: number; } | number)
max(length: number)
min(length: number)
rest<Validator, T extends Array<any> = [...Type, ...Validator[]]>(validator: Validator): TupleValidator<T, inferInput<T>, inferOutput<T>>