title: for-each loop for form validation
body: <p>Ok, so I have some validation to do on a form with many rows (20+) and 4 fields per row. </p>
  
  <ul>
  <li>Each column has specific validation requirements</li>
  <li>Rows should be complete, not half filled. Empty rows should be skipped</li>
  </ul>
  
  <p>How do I iterate through the form if each field in the html form has a unique name. For example productCode_1, productCode_2, productCode_3 etc..</p>
  
  <pre><code> &lt;tr&gt;
  &lt;td&gt;&lt;div align="center"&gt;
    &lt;input name="productCode_1" type="text" id="productCode_1" size="7" maxlength="7" /&gt;
  &lt;/div&gt;&lt;/td&gt;
  &lt;td&gt;&lt;div align="center"&gt;
    &lt;input name="size_1" type="text" id="size_1" size="2" maxlength="2" /&gt;
  &lt;/div&gt;&lt;/td&gt;
  &lt;td&gt;&lt;div align="center"&gt;
      &lt;input name="quantity_1" type="text" id="quantity_1" size="3" maxlength="3" /&gt;
  &lt;/div&gt;&lt;/td&gt;
  &lt;td&gt;&lt;div align="center"&gt;
      &lt;input name="price_1" type="text" id="price_1" size="3" maxlength="3" /&gt;
  &lt;/div&gt;&lt;/td&gt;
  </code></pre>
  
  <p></p>
  
  <p>Above is a sample of the HTML, please note that I don't have permission to modify the HTML.</p>