Caplin Trader 4.8.0

Class: module:caplin/core/validator/MapConfigValueValidator

module:caplin/core/validator/MapConfigValueValidator

Constructor

new module:caplin/core/validator/MapConfigValueValidator(config)

The MapConfigValueValidator is a module:caplin/trading/validation/Validator that ensures the value being validated conforms to the given configuration.
Parameters:
Name Type Description
config object configuration object specifying the allowed/required keys and values in a map. The validity of the config object is checked by the utility method module:caplin/core/validator/MapConfigUtility.checkConfig.
Implements:

Methods

validate(value, attributes, validationResult)

Determine whether the given value conforms to any required type, minimum, value, etc and set result on the provided module:br/validation/ValidationResult.
Parameters:
Name Type Description
value Object The value to validate.
attributes Object attributes to control the validation process.
validationResult module:br/validation/ValidationResult the ValidationResult in which to store the result of this validation.
Implements: