Wijmo UI for the Web
validateNumber Method
wijmo.input Namespace > IFormatValidateLib Interface : validateNumber Method
The string value to validate as a number.
The lowest number to accept as a valid value.
The highest number to accept as a valid value.
The culture to use in validating the value. (Some cultures use a comma as a decimal marker.)

Use this method to validate the specified value against the specified options and return a Boolean value. If the value cannot be parsed with the specified parameters, it returns false. To use this method, instead of wijmo.input.IFormatValidateLib.validateNumber, use $.wijinputcore.validateNumber. See example below for the correct usage.

Syntax
var instance; // Type: wijmo.input.IFormatValidateLib;
var returnValue; // Type: bool

// Parameters
var value; // Type:  string
var minValue; // Type:  number
var maxValue; // Type:  number
var culture; // Type:  string

returnValue = instance.validateNumber(value, minValue, maxValue, culture);
function validateNumber( 
   value : string,
   minValue : number,
   maxValue : number,
   culture : string
) : bool;

Parameters

value
The string value to validate as a number.
minValue
The lowest number to accept as a valid value.
maxValue
The highest number to accept as a valid value.
culture
The culture to use in validating the value. (Some cultures use a comma as a decimal marker.)

Return Value

Returns a bool indicating whether the number from the value string falls within the specified range.
Example
$.wijinputcore.validateNumber("123,45.6", 100, 100000);   // returns: true
See Also

Reference

IFormatValidateLib Interface