import { BaseValidator } from "https://deno.land/x/oridune_validator@v0.2.37/mod.ts";
Constructors
new
BaseValidator(type: ValidatorType, options: IBaseValidatorOptions)Properties
protected
CustomValidators: TCustomValidator<any, any>[]protected
Exception: ValidationExceptionprotected
Type: ValidatorTypeMethods
protected
_resolveErrorMessage(message: TErrorMessage | undefined, defaultMessage: string)protected
_toJSON(_options?: IJSONSchemaOptions): IValidatorJSONSchemaprotected
_toSample(_options?: ISampleDataOptions): Inputprotected
_validate(ctx: IValidatorContext): Promise<IValidatorContext>custom<Return>(validator: TCustomValidator<Output, Return>): BaseValidator<Type, Input, TCustomValidatorReturn<Return, Output>>
Provide a custom method for validation.
test(input?: any, options?: IValidationOptions)
Tries to execute the validation chain and returns a boolean value based on the result.
try(input?: any, options?: IValidationOptions)
Tries to execute the validation chain and if there is an error, it will not be thrown but instead will be returned.
Static Methods
resolveValidator<V extends BaseValidator<any, any, any>>(validator: any): V