Javascript Validate us zip code Javascript March 6, 2013 Pramod T P var isValidZip = /(^d{5}$)|(^d{5}-d{4}$)/.test(zip); if(isValidZip==false) alert(“Invalid zip”);