i\'m making some input mask that allows only float number. But current problem is I can\'t check if multiple dots entered. Can you check those dots and prevent it for me?
I found this way to do this,
$.validator.addMethod("currency", function (value, element) { return this.optional(element) || /^\$(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?$/.test(value); }, "Please specify a valid amount");
https://gist.github.com/jonkemp/9094324