{"action":"created","issue":{"url":"https://api.github.com/repos/jzaefferer/jquery-validation/issues/1775","repository_url":"https://api.github.com/repos/jzaefferer/jquery-validation","labels_url":"https://api.github.com/repos/jzaefferer/jquery-validation/issues/1775/labels{/name}","comments_url":"https://api.github.com/repos/jzaefferer/jquery-validation/issues/1775/comments","events_url":"https://api.github.com/repos/jzaefferer/jquery-validation/issues/1775/events","html_url":"https://github.com/jzaefferer/jquery-validation/issues/1775","id":151707930,"number":1775,"title":"Mimetype Jquery Validations Error","user":{"login":"prafulbagai","id":4829481,"avatar_url":"https://avatars.githubusercontent.com/u/4829481?v=3","gravatar_id":"","url":"https://api.github.com/users/prafulbagai","html_url":"https://github.com/prafulbagai","followers_url":"https://api.github.com/users/prafulbagai/followers","following_url":"https://api.github.com/users/prafulbagai/following{/other_user}","gists_url":"https://api.github.com/users/prafulbagai/gists{/gist_id}","starred_url":"https://api.github.com/users/prafulbagai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prafulbagai/subscriptions","organizations_url":"https://api.github.com/users/prafulbagai/orgs","repos_url":"https://api.github.com/users/prafulbagai/repos","events_url":"https://api.github.com/users/prafulbagai/events{/privacy}","received_events_url":"https://api.github.com/users/prafulbagai/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jzaefferer/jquery-validation/labels/Bug","name":"Bug","color":"e10c02"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-28T18:11:36Z","updated_at":"2016-05-28T10:45:19Z","closed_at":null,"body":"### Mimetype Jquery Validations Error\r\n\r\nI've an input file field. I want that the file uploaded should be either image/video file. So following is jQuery Validation rule:-\r\n\r\n    img1: {\r\n        accept: \"image/*, video/*\",\r\n    },\r\n\r\nBut when I upload a video, it gives me a `Incorrect mimetype error`. **Why?** Upoading images works fine though, but when I accept only the video, it works, ie\r\n\r\n    img1: {\r\n        accept: \"video/*\",\r\n    },\r\n\r\n**How can I accept images and videos at the same time?**\r\n\r\nFor the following rule:-\r\n\r\n    img1: {\r\n        accept: \"video/*,image/*\",\r\n    },\r\n\r\nVideos are accepted and while uploading images, it gives a mimetype error- which means anything which is referred second throws a mimetype error.\r\n\r\n### Your environment\r\n* version of `jquery-validate` - 1.15.0\r\n* which browser and its version - Checked on latest Chrome & Mozilla.\r\n\r\n### Steps to reproduce\r\nhttps://jsfiddle.net/nLphsovw/1/\r\n\r\n    <!doctype html>\r\n    <html>\r\n        <head>\r\n            <meta charset=\"utf-8\">\r\n            <title>Required, only audio files allowed:</title>\r\n            <link rel=\"stylesheet\" href=\"http://jqueryvalidation.org/files/demo/site-demos.css\">\r\n        </head>\r\n        <body>\r\n            <form id=\"myform\">\r\n                <label for=\"field\">Required, audio files only: </label>\r\n                <input type=\"file\" class=\"left\" id=\"field\" name=\"field\">\r\n                <br/>\r\n                <input type=\"submit\" value=\"Validate!\">\r\n            </form>\r\n            <script src=\"http://code.jquery.com/jquery-1.11.1.min.js\"></script>\r\n            <script src=\"http://cdn.jsdelivr.net/jquery.validation/1.15.0/jquery.validate.min.js\"></script>\r\n            <script src=\"http://cdn.jsdelivr.net/jquery.validation/1.15.0/additional-methods.min.js\"></script>\r\n            <script>\r\n                // just for the demos, avoids form submit\r\n                jQuery.validator.setDefaults({\r\n                  debug: true,\r\n                  success: \"valid\"\r\n                });\r\n                $( \"#myform\" ).validate({\r\n                  rules: {\r\n                    field: {\r\n                      required: true,\r\n                      accept: \"image/*,video/*\"\r\n                    }\r\n                  }\r\n                });\r\n            </script>\r\n        </body>\r\n    </html>\r\n\r\n### Expected behaviour\r\nIt should just accept both the video and audio files.\r\n\r\n### Actual behaviour\r\nIt returns a **Please enter a value with a valid mimetype.**\r\n"},"comment":{"url":"https://api.github.com/repos/jzaefferer/jquery-validation/issues/comments/222302223","html_url":"https://github.com/jzaefferer/jquery-validation/issues/1775#issuecomment-222302223","issue_url":"https://api.github.com/repos/jzaefferer/jquery-validation/issues/1775","id":222302223,"user":{"login":"staabm","id":120441,"avatar_url":"https://avatars.githubusercontent.com/u/120441?v=3","gravatar_id":"","url":"https://api.github.com/users/staabm","html_url":"https://github.com/staabm","followers_url":"https://api.github.com/users/staabm/followers","following_url":"https://api.github.com/users/staabm/following{/other_user}","gists_url":"https://api.github.com/users/staabm/gists{/gist_id}","starred_url":"https://api.github.com/users/staabm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/staabm/subscriptions","organizations_url":"https://api.github.com/users/staabm/orgs","repos_url":"https://api.github.com/users/staabm/repos","events_url":"https://api.github.com/users/staabm/events{/privacy}","received_events_url":"https://api.github.com/users/staabm/received_events","type":"User","site_admin":false},"created_at":"2016-05-28T10:45:19Z","updated_at":"2016-05-28T10:45:19Z","body":"@prafulbagai could you confirm that #1779 fixes your issue?"}}
{"actor":{"display_login":"staabm"}}