Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Removed spaces with multiple MIME types

If multiple MIME-types are specified, this will get rid of any extra spaces between them.

`audio/mp3, audio/m4v`



for parsing successfully.
  • Loading branch information...
1 parent 3d02806 commit 2fbe406995e07c93584dfc98bcaf612c066abe65 @createbang createbang committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  additional-methods.js
2  additional-methods.js
@@ -404,7 +404,7 @@ jQuery.validator.addMethod("skip_or_fill_minimum", function(value, element, opti
// Accept a value from a file input based on a required mimetype
jQuery.validator.addMethod("accept", function(value, element, param) {
// Split mime on commas incase we have multiple types we can accept
- var typeParam = typeof param === "string" ? param.replace(/,/g, '|') : "image/*",
+ var typeParam = typeof param === "string" ? param.replace(/\s/g, '').replace(/,/g, '|') : "image/*",
optionalValue = this.optional(element),
i, file;

0 comments on commit 2fbe406

Please sign in to comment.
Something went wrong with that request. Please try again.