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>ValidationSchema

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

Validation schema is a decorator-free way of validation of your objects. Also using validation schemas makes this library to be easily used with es6/es5.

Properties

name: string

Schema name. This is required, because we tell validator to validate by this schema using its name.

properties: { [propertyName: string]: { type: string; constraints?: any[]; message?: string | ((
value?: any,
constraint1?: any,
constraint2?: any,
) => string)
; each?: boolean; always?: boolean; groups?: string[]; options?: any; }[]; }

Validated properties.