$('#create_membership').click(function () {
var zip = $('#zip').val();
else if (zip == ''){
errorMessage = "*Zipcode required!";
}
else if ((zip.length)< 5 || (zip.length)>5 ){
errorMessage = "*zipcode should only be 5 digits";
}
else if ( zip =( "^[0-9]+$" )){
errorMessage = "*zipcode should be numbers only";
}
I am getting first and second i.e., empty and length validations for zip code.but for the 3rd case,number validation is not working.can any one help me for getting the number validation thanks in advance