JonathanStanton
07-24-2010, 11:38 PM
I want to validate a form with only numbers and "$" sign.
so far i know this
currencyValue = which.value;
var re = /^[0-9]*$/;
if (!re.test(currencyValue)) {
alert("Value must be all numberic charcters, non numeric's removed from field!");
field.value = field.value.replace(/D/g,"");
}
but how do I also add the "$" sign as ok?
so far i know this
currencyValue = which.value;
var re = /^[0-9]*$/;
if (!re.test(currencyValue)) {
alert("Value must be all numberic charcters, non numeric's removed from field!");
field.value = field.value.replace(/D/g,"");
}
but how do I also add the "$" sign as ok?