Verify input value

Verify that the input value is a number by javascript function 

function isNumber(n) { return /^-?[\d.]+(?:e-?\d+)?$/.test(n); } 

------------------------

isNumber ('123'); // true  
isNumber ('123abc'); // true  
isNumber (5); // true  
isNumber ('q345'); // false
isNumber(null); // false
isNumber(undefined); // false
isNumber(false); // false
isNumber('   '); // false


https://stackoverflow.com/questions/1303646/check-whether-variable-is-number-or-string-in-javascript

xu xu wrote:

Verify that the input value is a number by javascript function 


Hi,


no need to use java script just assign integer/long integer variable to input and select type as a number and then check valid property of the input widget in action.


Thanks