Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/deno_class_validator/src/index.ts>ValidatorConstraintInterface

Decorator-based property validation for classes.
Latest
interface ValidatorConstraintInterface
Re-export
import { type ValidatorConstraintInterface } from "https://deno.land/x/deno_class_validator@v1.0.0/src/index.ts";

Custom validators must implement this interface to provide custom validation logic.

Methods

validate(value: any, validationArguments?: ValidationArguments): Promise<boolean> | boolean

Method to be called to perform custom validation over given value.

optional
defaultMessage(validationArguments?: ValidationArguments): string

Gets default message when validation for this constraint fail.