title: How do I say "if value is not equal to a, b, or c"?
body: <pre><code>$(this).attr('id') == 'zipcode' &amp;&amp; $this.value()!=(3, 4, 5)
  </code></pre>
  
  <p>What I tried to do here was call up the text input field with an id of "zipcode" and say something along the lines of "if value of zipcode is not 3, 4, or 5 then... etc etc..." I tried many combinations including || but nothing has worked. I'll be listing all the possible zip codes and would require the shortest possible way to do it. </p>
  
  <p>Much appreciated. </p>
  
  <p>Full code:</p>
  
  <pre><code>function validateStep(step){ if(step == fieldsetCount) return;
  
  var error = 1;
  var hasError = false;
  $('#formElem').children(':nth-child('+ parseInt(step) +')').find(':input.req:not(button)').each(function(){
      var $this       = $(this);
      var valueLength = jQuery.trim($this.val()).length;
  var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/; 
  
  if(valueLength == "" || $(this).attr('id') =='email' &amp;&amp; !emailPattern.test($this.val()) || $(this).attr('id') == 'zipcode' &amp;&amp; $this.value()!=(3, 4, 5))   
  
  {
          hasError = true;
          $this.css('background-color','#FFEDEF');
      }
      else
          $this.css('background-color','#fff');
  
  });
  </code></pre>