In your regex, one character is expected from the first class (0-9), then one from the second class (comma), then one from the last class (period). Instead, you want any number of characters (*) from the class to contain numbers, commas, and periods ( [0-9,.]). Also, you do not need parentheses:
var isValid = /^[0-9,.]*$/.test(str);
DEMO (and explanation): http://regex101.com/r/yK6oF4