I am trying to build a regex which will allow both negative and positive decimal numbers with the following rules.
var NumberToValidate = 48428; var valid = /^([0-9]*[1-9][0-9]*)$/.test(NumberToValidate); { if (!valid) alert("Invalid Quantity!!\nThe Quantity cannot be Zero\n or a part of a Unit !"); return false; }