Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.