title: Bootstrap validation on dynamically adding multiple fields
body: <p>I am using bootstrap v3.1.1 and I want to validate a form with bootstrap validation but who contains a button to clone 3 fields. With cloning everything works nice, but I can't validate the cloned fields. Here is my HTML Form:</p>
  
  <pre><code>&lt;form id="myForm" action="myAction"&gt;
      &lt;div class="row" id="line_1"&gt;
          &lt;div class="col-md-2 form-group"&gt;
              &lt;input type="text" class="form-control input-sm" id="idFirstField_1" name="firstField[]"&gt;
          &lt;/div&gt;
          &lt;div class="col-md-2 form-group"&gt;
              &lt;input type="text" class="form-control input-sm" id="idSecondField_1" name="secondField[]"&gt;
          &lt;/div&gt;
          &lt;div class="col-md-2 form-group"&gt;
              &lt;input type="text" class="form-control input-sm" id="idThirdField_1" name="thirdField[]"&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;a id="cloneButton"&gt;add line&lt;/a&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>In JavaScript file I Have:</p>
  
  <pre><code>    $(document).ready(function () {
      var count = 2;
      $('#cloneButton').click(function () {
          var klon = $('#line_1');
          klon.clone().attr('id', 'line_' + (++count)).insertAfter($('#line_1'));
          $('#line_' + count).children('div').children('input').each(function () {
              $(this).val('');
              var oldId = $(this).attr('id').split('_');
              $(this).attr('id', oldId[0] + '_' + count);
          });
      });
  
      //For validating the fields: 
      $('#myForm').bootstrapValidator({
          fields: {
              'firstField[]': {
                  validators: {
                      notEmpty: {
                          message: 'Enter a value'
                      }
                  }
              },
              'secondField[]': {
                  validators: {
                      notEmpty: {
                          message: 'Enter a value'
                      }
                  }
              },
              'thirdField[]': {
                  validators: {
                      notEmpty: {
                          message: 'Enter a value'
                      }
                  }
              }
          }
      });
  });
  </code></pre>
  
  <p>I now that I must to use somethings like this </p>
  
  <pre><code>$('#myForm').bootstrapValidator('addField', klon.find('[name="firstField[]"]'));
  </code></pre>
  
  <p>for each field, but I don't now how correctly do it. Please help me. Thanks!!</p>