{"action":"opened","issue":{"url":"https://api.github.com/repos/primefaces/primefaces/issues/1981","repository_url":"https://api.github.com/repos/primefaces/primefaces","labels_url":"https://api.github.com/repos/primefaces/primefaces/issues/1981/labels{/name}","comments_url":"https://api.github.com/repos/primefaces/primefaces/issues/1981/comments","events_url":"https://api.github.com/repos/primefaces/primefaces/issues/1981/events","html_url":"https://github.com/primefaces/primefaces/issues/1981","id":196983338,"number":1981,"title":"required attribute not working for p:fileUpload when mode=\"simple\"","user":{"login":"mauromol","id":1742494,"avatar_url":"https://avatars.githubusercontent.com/u/1742494?v=3","gravatar_id":"","url":"https://api.github.com/users/mauromol","html_url":"https://github.com/mauromol","followers_url":"https://api.github.com/users/mauromol/followers","following_url":"https://api.github.com/users/mauromol/following{/other_user}","gists_url":"https://api.github.com/users/mauromol/gists{/gist_id}","starred_url":"https://api.github.com/users/mauromol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mauromol/subscriptions","organizations_url":"https://api.github.com/users/mauromol/orgs","repos_url":"https://api.github.com/users/mauromol/repos","events_url":"https://api.github.com/users/mauromol/events{/privacy}","received_events_url":"https://api.github.com/users/mauromol/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-21T17:01:45Z","updated_at":"2016-12-21T17:01:45Z","closed_at":null,"body":"## 1) Environment\r\n- PrimeFaces version: 6.0\r\n- Does it work on the newest PrimeFaces version? Not with 6.0\r\n- Application server + version: Tomcat 8\r\n- Affected browsers: Firefox 50.0.2\r\n\r\n## 2) Expected behavior\r\nIf my <p:fileUpload> has both mode=\"simple\" and required=\"true\", validation should fail and the form submit should not take place.\r\n\r\n## 3) Actual behavior\r\nThe form submit is performed anyway, ignoring the required=\"true\" attribute (and of course the requiredMessage attribute).\r\n\r\n## 4) Steps to reproduce\r\n\r\nCreate a skinned simple and required fileUpload, then try to submit the form.\r\n\r\n## 5) Sample XHTML\r\n\r\n    <p:fileUpload id=\"registryUpload\"\r\n      value=\"#{bean.zipFile}\"\r\n      allowTypes=\"/(\\.|\\/)(zip)$/i\" sizeLimit=\"524288000\" mode=\"simple\"\r\n      skinSimple=\"true\" invalidFileMessage=\"Invalid file type\"\r\n      messageTemplate=\"Can't upload file {name}. It must be a .zip file\"\r\n      required=\"true\" requiredMessage=\"You must select the ZIP file to upload\"\r\n      update=\"registryUploadMessage\" />\r\n    <p:message id=\"registryUploadMessage\" for=\"registryUpload\" />\r\n\r\n## 6) Sample bean\r\n\r\n    public class MyBean {\r\n      private UploadedFile zipFile;\r\n    \r\n      // getter/setter omitted\r\n    }\r\n"}}
{"actor":{"display_login":"mauromol"}}