victorjonsson / jQuery-Form-Validator

[DISCONTINUED] jQuery plugin that makes it easy to validate user input while keeping your HTML markup clean from javascript code.
972 stars 476 forks source link

Excel mime types not working correctly #646

Open peterostrander opened 6 years ago

peterostrander commented 6 years ago

Adding validation for MS Excel spreadsheet mime types doesn't appear to be working correctly:

data-validation-allowing="application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"

The above attr allows for non spreadsheet MS documents like ppt and pptx to be pass validation. The error output when uploading a non-compatible file (like a png) returns the following:

Only files of type application/vnd.ms, excel, application/vnd.openxmlformats, officedocument.spreadsheetml.sheet is allowed

It appears there's some issue when parsing mime types that contain a dash.