title: Validate all the inputs of a table in jquery
body: <p>I have a set of inputs that are dynamically generated and their id's incremented based on the number of items in an array</p>
  
  <pre><code>                    &lt;table width="100%"&gt;
  
                        &lt;?php $i = 1; ?&gt;
                            &lt;?php foreach ($products as $product) { ?&gt;
                            &lt;tr&gt;
                              &lt;td&gt;
                                  &lt;p&gt;&lt;b&gt;&lt;?php echo $product['name']; ?&gt;&lt;/b&gt;&lt;/p&gt;
                              &lt;/td&gt;
                              &lt;td&gt;
                              &lt;/td&gt;
                              &lt;td&gt;
                              &lt;/td&gt;
                              &lt;td&gt;
                              &lt;/td&gt;
                            &lt;/tr&gt;
                            &lt;tr&gt;
                              &lt;td&gt;
  
                                  &lt;div class="form-group"&gt;
                                      &lt;label class="control-label" for="firstname_&lt;?php echo $i; ?&gt;"&gt;First Name:&lt;/label&gt;
                                      &lt;input name="firstname_&lt;?php echo $i; ?&gt;" id="firstname_&lt;?php echo $i; ?&gt;" required&gt;
                                  &lt;/div&gt;
                              &lt;/td&gt;
                              &lt;td&gt;
                                  &lt;div class="form-group"&gt;
                                      &lt;label class="control-label" for="lastname_&lt;?php echo $i; ?&gt;"&gt;Last Name:&lt;/label&gt;
                                      &lt;input name="lastname_&lt;?php echo $i; ?&gt;" id="lastname_&lt;?php echo $i; ?&gt;" required&gt;
                                  &lt;/div&gt;
                              &lt;/td&gt;
                              &lt;td&gt;
                                  &lt;div class="form-group"&gt;
                                      &lt;label class="control-label" for="recipient_number_&lt;?php echo $i; ?&gt;"&gt; Phone Number:&lt;/label&gt;
                                      &lt;input name="recipient_number_&lt;?php echo $i; ?&gt;" id="recipient_number_&lt;?php echo $i; ?&gt;" required&gt;
                                  &lt;/div&gt;
                              &lt;/td&gt;
                              &lt;td&gt;
                                  &lt;div class="form-group"&gt;
                                      &lt;label class="control-label" for="recipient_email_&lt;?php echo $i; ?&gt;"&gt; Email:&lt;/label&gt;
                                      &lt;input name="recipient_number_&lt;?php echo $i; ?&gt;" id="recipient_email_&lt;?php echo $i; ?&gt;" required&gt;
                                  &lt;/div&gt;                                  
                              &lt;/td&gt;
                            &lt;/tr&gt;
                            &lt;?php $i++; ?&gt;
                        &lt;?php } ?&gt;
  
                  &lt;/table&gt;
  </code></pre>
  
  <p>I am trying to look for a way using JQuery to loop through all the generated inputs to ensure they are not empty</p>