title: Validate only visible fields with jQuery classes
body: <p>I'm validating a form using jQuery validation. </p>
  
  <p>For that I only add an specific class to the fields ("required","email",etc..).</p>
  
  <p>Ex: <code>&lt;input id="form_linom" class="required" type="text" value="" name="form_linom" size="50"&gt;</code></p>
  
  <p>Since is a big and dynamic form (selections in some fields hide or show other fields) I have problems when submitting the form since validator doesn't permit send the data to the server because is validating also the hidden fields.</p>
  
  <p>The way I add the class to each field is making an array in PHP of all the required fields and then if the field is in that array the class is added.</p>
  
  <hr>
  
  <p>Please read the question before answer. I'm uncomfortable with those no related and 'easy' answers that only criticize the question. I posted all the code I use to validate. The only other thing that I put was this in the header:</p>
  
  <pre><code>$("#form_proyecto").validate();
  </code></pre>
  
  <hr>
  
  <p>I posted code in <a href="http://jsfiddle.net/yW73h/" rel="nofollow">http://jsfiddle.net/yW73h/</a>, look that the email field is hidden but prevent the form to be sent.
  I need a general rule that collect all the required fields that are hidden, not only the e-mail field as in the example (In my real form I have 54 fields).</p>