Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/deno_class_validator/src/decorator/ValidationOptions.ts>ValidationOptions

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

Options used to pass to validation decorators.

Properties

optional
each: boolean

Specifies if validated value is an array and each of its items must be validated.

optional
message: string | ((validationArguments: ValidationArguments) => string)

Error message to be used on validation fail. Message can be either string or a function that returns a string.

optional
groups: string[]

Validation groups used for this validation.

optional
always: boolean

Indicates if validation must be performed always, no matter of validation groups used.

optional
context: any