Mootools extension, check string is numeric.
String.implement({ | |
isNumeric: function() { | |
var r = true; | |
this.split('').each(function(i) { | |
if ('0123456789.,'.indexOf(i) == -1) { | |
r = false; | |
} | |
}); | |
return r; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment