Interface ValidatorOptions

interface ValidatorOptions {
    each: boolean;
    message: string;
    optional: boolean;
    primitiveCheck: boolean;
}

Properties

each: boolean

Applies the validator function to each element if the value is an array.

message: string

Validation error message to be shown if validator function return false.

optional: boolean

Prevents an error from being thrown if the validation fails.

primitiveCheck: boolean

Ensures that a relation exists before defining the Transformer decorator.