[thelist] js for zip code validation

todea todea at escape.com
Mon Dec 9 16:27:01 CST 2002

Can someone help out with som js form validation. I want to validate a zip
code entered by the user against a list of existing zip codes.

I'm trying to do it like this with a few zip codes in an array. But this
doesn't work.

function validate()
znum=new Array("10010","90534")
if (txt == znum)
 return true
 alert("Error wrong zip")
 return false

More information about the thelist mailing list