I am trying to use RegExp validation for a number that can have up to 5 numbers followed up one option decimal place. Like 48293 or 23.4 are good. 99.99 or 453543 are not. I wrote the following function:
function validateLoad(load_value) {
var matchValue = new RegExp('[0-9]{1,5}(\.[0-9]{1})?')
return matchValue.test(load_value)
}
However, this seems to return true for all numerical values, can anyone tell me how to fix this?
[0-9]{0,5}