Caplin Trader 4.7.1

Class: module:caplin/core/validator/NumericRangeValidator

module:caplin/core/validator/NumericRangeValidator

Constructor

new module:caplin/core/validator/NumericRangeValidator(errorMessageopt)

The NumericRangeValidator is a module:caplin/trading/validation/Validator that ensures the range to be validated against is valid.
Parameters:
Name Type Attributes Description
errorMessage string <optional>
i18n key for error message to be passed to the ValidationResult.
Implements:

Methods

validate(properties, oValidationResult)

Determine whether the given properties containing the range and the object that sets the validation result are valid. module:br/validation/ValidationResult.
Parameters:
Name Type Description
properties object A named set of properties to validate.
Properties
Name Type Description
from object An object with a getValue() method that returns the from string to be validated.
to object An object with a getValue() method that returns the to string to be validated.
oValidationResult module:br/validation/ValidationResult The result object that the outcome of the validation will be set on.
Implements: