title: Validating several fields with the same name using jQuery Validate
body: <p>I have an HTML form that I'm processing with Perl CGI, like so:</p>
  
  <pre><code>&lt;form action="process.cgi" id="main"&gt;
    &lt;input type="text" name="foo" class="required" /&gt;
    &lt;input type="text" name="foo" class="required" /&gt;
    &lt;input type="text" name="foo" class="required" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And I'm validating it with the  <a href="http://jqueryvalidation.org" rel="nofollow">jQuery Validation plugin</a>.  Trouble is, when I call <code>$('#main').valid()</code>, it only checks that the first field is non-empty.  How to I get it to check all the fields?</p>