title: Bootstrap validator for modal doesnt reset Form
body: <p>I am using bootstrap validator for my form inside modal.The validator gets retained on subsequent form access. For example if the do the following operation</p>
  
  <ol>
  <li>Access form enter some valid value and submit the form.</li>
  <li><p>Access the form again the color of the field still remain in green , since i entered a valid entry in my previous form submission</p>
  
  <pre><code>&lt;div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&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"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;span class="sr-only"&gt;Close&lt;/span&gt;&lt;/button&gt;
      &lt;h4 class="modal-title" id="myModalLabel"&gt;Add new Node&lt;/h4&gt;
    &lt;/div&gt;
     &lt;div class="modal-body"&gt;
      &lt;div class="modal-body"&gt;
          &lt;form role="form" id="addNodeForm"&gt;
            &lt;div class="form-group"&gt;
              &lt;label for="nodename" class="control-label"&gt;Node Name&lt;/label&gt;
              &lt;input type="text" name="nodename" class="form-control" id="nodename" required&gt;
            &lt;/div&gt;
  
          &lt;/form&gt;
     &lt;/div&gt;
    &lt;!--  &lt;div class="alert alert-success"&gt;
          &lt;a href="#" class="close" data-dismiss="alert"&gt;&amp;times;&lt;/a&gt;
          &lt;div id="thanks"&gt;&lt;/div&gt;
      &lt;/div&gt; --&gt;
   &lt;/div&gt;
   &lt;div class="modal-footer"&gt;
    &lt;button type="button" id="add-close" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
     &lt;button type="button" id="add-save" class="btn btn-primary"&gt;Save changes&lt;/button&gt;
   &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>        $('#myModal').on('hidden.bs.modal', function(){
              $(this).removeData('bs.modal');
              $('#nodename').val("");
              $('#addNodeForm').bootstrapValidator('resetForm', true);
          });
  
          $('#myModal').on('show.bs.modal', function () {
               // $('#addNodeForm').bootstrapValidator('resetForm', true);
              $(this).removeData('bs.modal');
              $('#addNodeForm').bootstrapValidator('resetForm', true);
                $.ajax(
                       {
                           url: "node/getnodelist",
                           type: "GET",
                           success:function(text) 
                           {
                               alert(text);
                              nodelist = text;
                           },
                           error: function(jqXHR, textStatus, errorThrown) 
                           {
                               //if fails      
                           }
                       });
              });
  
          $('#addNodeForm').bootstrapValidator({
              feedbackIcons: {
                  valid: 'glyphicon glyphicon-ok',
                  invalid: 'glyphicon glyphicon-remove',
                  validating: 'glyphicon glyphicon-refresh'
              },
              fields: {
                  nodename: {
                      validators: {
                          notEmpty: {
                              message: 'Function name is required'
                          }
                      }
                  }
              }
          });
  </code></pre></li>
  </ol>