Interface ValidatorOptions

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

Properties

each: boolean

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

message: string

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

optional: boolean

Do not throw an error if the validation doesn't match

primitiveCheck: boolean

Verify a relation already exist before the definition of the controller