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

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

Validation error description.

Properties

optional
children: ValidationError[]

Contains all nested validation errors of the property.

optional
constraints: { [type: string]: string; }

Constraints that failed validation with error messages.

optional
contexts: { [type: string]: any; }
optional
property: string

Object's property that haven't pass validation.

optional
target: object

Object that was validated.

OPTIONAL - configurable via the ValidatorOptions.validationError.target option

optional
value: any

Value that haven't pass a validation.

OPTIONAL - configurable via the ValidatorOptions.validationError.value option

Methods

toString(
shouldDecorate?: boolean,
hasParent?: boolean,
parentPath?: string,
): string