Caplin Trader 4.7.1

Class: module:caplin/core/validator/MapConfigKeyValidator

module:caplin/core/validator/MapConfigKeyValidator

Constructor

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

The MapConfigKeyValidator is a module:caplin/trading/validation/Validator that ensures the key being validated is an allowed key in 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(key, attributes, validationResult)

Determine whether the given key is allowed according to the config and set result on the provided module:br/validation/ValidationResult.
Parameters:
Name Type Description
key Object The key to validate.
attributes Object attributes to control the validation process. Not used in this implementation.
validationResult module:br/validation/ValidationResult the ValidationResult in which to store the result of this validation.
Implements: