Caplin Trader 4.8.0

Class: module:caplin/core/validator/MapConfigRequiredKeysValidator

module:caplin/core/validator/MapConfigRequiredKeysValidator

Constructor

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

The ConfigMapValidator is a module:caplin/trading/validation/Validator that ensures the map being validated contains all required keys specified 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

getRequiredFields() → {Array}

Return an array of all required fields
Returns:
The required fields.
Type
Array

validate(map, attributes, validationResult)

Determine whether the provided map contains all required keys and set result on the provided module:br/validation/ValidationResult.
Parameters:
Name Type Description
map Object The map 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: