I've got a form that I want to test to make sure the user entered a zip code in a valid array and I'm not sure how to check it...
The zip code list is like 11111, 11114, 11117, so I can't just include a range...
I had written a function like:
but, I have to exclude the non-inclusive zip codes...so, how do I create an array and test against it???Code:function validate_zip(field,alerttxt) { with (field) { if (value==null||(value<"11111"||value>"11174")) {alert(alerttxt);return false;} else {return true} } }
TIA!!!




Reply With Quote