Interface: 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.


validate(vValue, mAttributes, oValidationResult)

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