[ https://issues.apache.org/jira/browse/MYFACES-4060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15415802#comment-15415802 ]
Bill Lucy commented on MYFACES-4060: ------------------------------------ This is the same issue reported on the mailing list last year: https://mail-archives.apache.org/mod_mbox/myfaces-users/201504.mbox/%3ccam1yojzc-brknl4_dyebbnk0a4_9wzwq93krcp08uobot2s...@mail.gmail.com%3E The patch looks good to me - if there aren't any objections I'll commit it. > Required attribute of h:inputFile tag is not working > ---------------------------------------------------- > > Key: MYFACES-4060 > URL: https://issues.apache.org/jira/browse/MYFACES-4060 > Project: MyFaces Core > Issue Type: Bug > Affects Versions: 2.2.10 > Reporter: Eduardo Breijo > Attachments: MYFACES-4060.patch > > > The required attribute of h:inputFile tag doesn't work when set to "true" and > no file is attached. The action will be executed regardless of the value of > the required attribute. > Example: > <h:form enctype="multipart/form-data"> > <h:messages /> > <h:inputFile value="#{indexBean.uploadFile}" required="true" /> > <h:commandButton value="TEST" action="#{indexBean.execute()}" /> > </h:form> > An error message should be expected/displayed when the required attribute is > set to true, and no file is attached. Instead it is executing the action > without attachments. -- This message was sent by Atlassian JIRA (v6.3.4#6332)