Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno_nest/deps.ts>ValidationError

Refer to nestjs to realize some common functions for Deno, support hono and oak
Go to Latest
class ValidationError
Re-export
import { ValidationError } from "https://deno.land/x/deno_nest@v3.5.1/deps.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