Skip to main content
Module

x/leaves/mod.ts>validator.ValidationError

A Web framework For Deno with Decorator and middleware
Latest
class validator.ValidationError
Re-export
import { validator } from "https://deno.land/x/leaves@v0.1.5/mod.ts";
const { ValidationError } = validator;

Validation error description.

Properties

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; }
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