Caplin Trader 5.1.0

Interface: module:br-validation/Validator

module:br-validation/Validator

A validator is a piece of code that can determine whether particular input should be considered valid.

Since you may want to run many validators on a piece of data, the result of the validation is stored on an object passed into the validate method.

This is an interface and should not be constructed.

Methods

validate(vValue, mAttributes, oValidationResult) → {void}

Determine whether the provided value is valid or not and set the result on the provided module:br-validation/ValidationResult.

Parameters:
Name Type Description
vValue Object

The value to validate.

mAttributes Object

attributes to control the validation process. Will not be null.

oValidationResult module:br-validation/ValidationResult

the ValidationResult to store the result of this validation in.

Returns:
Type
void