Constructor
new NumberRangeValidator(options)
Constructs a NumberRangeValidator that ensures the value provided is within a given range
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
options |
Object |
<optional> |
an object literal used to provide:
|
- Source:
- ojvalidation/NumberRangeValidator.js, line 71
Methods
-
getHint() → {String|null}
-
- Source:
- ojvalidation/NumberRangeValidator.js, line 173
Returns:
a hint message or null if no hint is available in the options- Type
- String | null
-
Init(options)
-
Initializes validator instance with the set options
Parameters:
Name Type Argument Description options
Object <optional>
- Source:
- ojvalidation/NumberRangeValidator.js, line 84
-
validate(value) → {string}
-
Validates the minimum + maximum conditions
Parameters:
Name Type Description value
string | number that is being validated - Source:
- ojvalidation/NumberRangeValidator.js, line 107
Throws:
when value is out of range- Type
- Error
Returns:
original if validation was successful- Type
- string