title: jQuery-Validation-Engine - Validation File MIME Type
body: <p>I would like to use the jQuery-Validation-Engine to validate the MIME Type of a file input. How could I do this?</p>
  
  <p>My approach would be something like this:</p>
  
  <pre><code>function checkMIME(field, rules, i, options){
      var file = $("#userfile")[0].files[0];
      var MimeFilter = /^(image\/bmp|image\/gif|image\/jpeg|image\/png|image\/tiff)$/i;
      if (! MimeFilter.test(file.type)) {
       return options.allrules.validate2fields.alertText;
    }
  }
  </code></pre>
  
  <p>Thanx
  Kashuda </p>