title: How to use Bootstrap validator to validate file size and file type
body: <p>I`m using Bootstrap validator (<a href="http://1000hz.github.io/bootstrap-validator/#" rel="nofollow">Validator plugin</a>) to validate my form but I have an input for files which I would like to have a custom validation for filetype and filesize (pdf,docx,doc..). </p>
  
  <pre><code>&lt;div class="form-group"&gt;
       &lt;div class="input-group"&gt;
        &lt;label class="input-group-btn"&gt;
         &lt;span class="btn btn-primary"&gt;
  Browse&amp;hellip; &lt;input type="file" style="display: none;" name="cv" required data-filesize="5242880" data-filesize-error="Max 5MB"&gt;
         &lt;/span&gt;
       &lt;/label&gt;
       &lt;div class="help-block with-errors"&gt;&lt;/div&gt;
        &lt;input type="text" class="form-control" readonly&gt;
       &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I need some directions on how I should use this plugin in order to validate the input on my frontend before the backend runs its own validation. </p>