I need to find whether a number inputed by a user is valid
Following cases are valid
1. `12`
2. `12.01`
The following case is invalid:
1. `12.` // decimal point with no number following
I have written a regular expression like
var decimalValidation = /^[0-9]*(\.?)[0-9]*$/;
var n = decimalValidation .test(value);
But the problem is that it accepts a value like 12.