Caplin Trader 4.0.3

Interface: module:br/presenter/validator/Validator

module:br/presenter/validator/Validator

Summary

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.

Methods

validate(vValue, mAttributes, oValidationResult)

Determine whether the provided value is valid or not and set the result on the provided module:br/presenter/validator/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/presenter/validator/ValidationResult the ValidationResult to store the result of this validation in.
Implementations:
  • module:br/presenter/validator/CrossPropertyValidatorProxy#validate
  • module:br/presenter/validator/NotEmptyValidator#validate
  • module:br/presenter/validator/NumericValidator#validate
  • module:br/presenter/validator/ValidMultiSelectionValidator#validate
  • module:br/presenter/validator/ValidSelectionValidator#validate