You can use the replace()
method to remove the commas and replace them with an empty string.
var number = "1,001";
console.log(number.replace(/\,/g, ""));
Another way I found (here) is to add the following to your constraints object
pattern:'#'