Constructor
new module:caplin/core/validator/NumericRangeValidator(errorMessageopt)
The
NumericRangeValidator
is a module:caplin/trading/validation/Validator
that ensures the string
being validated is an expression of a decimal number. Empty string is allowed: if you don't want to allow empty
string, use the module:br/presenter/validator/NotEmptyValidator
.
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 parsing the given string results in a decimal number and set result on the provided
module:caplin/core/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/presenter/validator/ValidationResult The result object that the outcome of the validation will be set on.