Skip to main content
Module

x/oridune_validator/mod.ts>StringValidator

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

Constructors

new
StringValidator(options?: IStringValidatorOptions)

Type Parameters

Type
Input
Output

Properties

protected
optional
MaxLength: number
protected
optional
MinLength: number
protected
Options: IStringValidatorOptions
protected
optional
Patterns: RegExp[]

Methods

protected
_toJSON(_options?: IJSONSchemaOptions)
protected
_toSample(_options?: ISampleDataOptions)
in<C extends string>(choices: C[]): StringValidator<Type, Input, C>
isURL<URLInstance extends boolean = false>(returnURLInstance?: URLInstance)
length(options: { min?: number; max?: number; } | number)
matches(options: { regex: RegExp | RegExp[]; } | RegExp | RegExp[])
max(length: number)
min(length: number)