This is what I currently have:
if (form.reg_age.value == "") {
showError("reg_age", regAgeError);
return false;
}
var fchars = "!@#$%^&*()+=-[]\\\';,./{}|\":<>?";
for (var x = 0; x < form.reg_age.value.length; x++) {
if (fchars.indexOf(form.reg_age.value.charAt(x)) != -1) {
showError("reg_age", regAgeErrorChr);
return false;
}
I need this to check the age entered to make sure its correct. Example: 222 is not a correct age but 22 is. Obviously the
var fchars = "!@#$%^&*()+=-[]\\\';,./{}|\":<>?";
for (var x = 0; x < form.reg_age.value.length; x++) {
if (fchars.indexOf(form.reg_age.value.charAt(x)) != -1) {
showError("reg_age", regAgeErrorChr);
return false;
}
is not correct and needs to be done differently but I do not have a clue in the world on what it should be.
Thanks for any help!