I`m using Bootstrap validator (Validator plugin) 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..).
<div class="form-group">
<div class="input-group">
<label class="input-group-btn">
<span class="btn btn-primary">
Browse… <input type="file" style="display: none;" name="cv" required data-filesize="5242880" data-filesize-error="Max 5MB">
</span>
</label>
<div class="help-block with-errors"></div>
<input type="text" class="form-control" readonly>
</div>
</div>
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.