first time post here.
I've the following code:
function validForm(passF orm) {
<< working validation skipped >>
re = /^\d{5}(-?\d{4})?$/
validZip = re.exec(passFor m.fldZipCode.va lue)
if ( !validZip ) {
alert("Please use either Zip or Zip+4 format");
passForm.fldZip Code.focus();
return false;
}
<< other validation skipped >>
return true;
}
obviously in a validation function. It appears that the execute function is
returning 'true' from the function as no further validation is being
performed on the form. I'm at wits end (and being halfwitted it came
quick). I've checked as much documentation as I can reasonably find. Also
have run other samples using similar regual expression and for unspecified
reasons, some seem to work, while others (as this does) just seem to exit
the .exec and return true. Suggestion??
I've the following code:
function validForm(passF orm) {
<< working validation skipped >>
re = /^\d{5}(-?\d{4})?$/
validZip = re.exec(passFor m.fldZipCode.va lue)
if ( !validZip ) {
alert("Please use either Zip or Zip+4 format");
passForm.fldZip Code.focus();
return false;
}
<< other validation skipped >>
return true;
}
obviously in a validation function. It appears that the execute function is
returning 'true' from the function as no further validation is being
performed on the form. I'm at wits end (and being halfwitted it came
quick). I've checked as much documentation as I can reasonably find. Also
have run other samples using similar regual expression and for unspecified
reasons, some seem to work, while others (as this does) just seem to exit
the .exec and return true. Suggestion??
Comment