Skip to content

Commit

Permalink
Merge pull request #136 from adamtester/adamtester-lowerparams
Browse files Browse the repository at this point in the history
Chrome and IE LowerParams fix
  • Loading branch information
torrentalle committed Mar 7, 2016
2 parents c3bb1e2 + 1578a16 commit 1258fac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion public/js/jsvalidation.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion resources/assets/js/validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,10 @@ $.extend(true, laravelValidation, {
* @return {boolean}
*/
Mimes: function(value, element, params) {
var lowerParams = $.map(params, String.toLowerCase);
var lowerParams = $.map(params, function(item, index) {
return item.toLowerCase();
});

return (!window.File || !window.FileReader || !window.FileList || !window.Blob) ||
lowerParams.indexOf(laravelValidation.helpers.fileinfo(element).extension.toLowerCase())!==-1;
},
Expand Down

1 comment on commit 1258fac

@aleixfabra
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.