title: Can't validate input in modal bootstrap
body: <p>hi i want to validated input in bootstrap modal<br>
  usually i'm using  something like this</p>
  
  <pre><code>&lt;input type="text" class="form-control" id="kode" name="kode" placeholder="Kode" required /&gt;
  </code></pre>
  
  <p>or using <a href="http://jqueryvalidation.org/" rel="nofollow">jquery validating plugins</a> like this</p>
  
  <pre><code>$("#formTest").validate({
      rules: {
          kode: "required"
      }
  });
  </code></pre>
  
  <p>but none of them working on input inside bootstrap modal<br>
  where i'm missing?</p>
  
  <hr>
  
  <p><strong>@update</strong> </p>
  
  <pre><code>&lt;button class="btn btn-primary form-button" id="addNew"&gt;Tambah Produk&lt;/button&gt; //button to show modal
  
  &lt;form method="post" id="formTest" action=""&gt;
      Username : &lt;input type="text" id="username" class="form-control" name="username" required&gt;
      &lt;button class="btn btn-primary" type="submit"&gt;&lt;/button
  &lt;/form&gt;
  
  &lt;div class="modal fade" id="myModal" role="dialog"&gt;
      &lt;div class="modal-dialog"&gt;
        &lt;div class="modal-content"&gt;
          &lt;div class="modal-header"&gt;
            &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;/button&gt;
            &lt;h4 class="modal-title"&gt;Modal Default&lt;/h4&gt;
          &lt;/div&gt;
          &lt;div class="modal-body"&gt;
  
              &lt;form method="post" id="formProduk" action="{{ URL::route('produk.post') }}"&gt;
                  &lt;div class="row form-group "&gt;
                      &lt;label for="kode_barang" class="control-label col-sm-3"&gt;Kode Barang&lt;span class="required"&gt;*&lt;/span&gt;&lt;/label&gt;
                      &lt;div class="col-sm-9"&gt;
                        &lt;input type="text" class="form-control" id="kode_barang" name="kode_barang" placeholder="Kode Barang" required /&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
  
                  &lt;button type="button" class="btn btn-primary" type="submit" id="saveData"&gt;Save&lt;/button&gt;
              &lt;/form&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>in my code above, i have 2 forms <code>formTest</code> and <code>formProduk</code><br>
  i don't have problem to validate in <code>formTest</code> with just <code>required</code> property in input</p>
  
  <p>meanwhile in <code>formProduk</code><br>
  i already using <code>required</code> in input <code>id=kode_barang</code><br>
  but after i click button <code>save</code><br> it's just parsing without validate to url <code>produk.post</code></p>