You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Eduardo Breijo (JIRA)" <de...@myfaces.apache.org> on 2016/08/10 18:21:20 UTC

[jira] [Created] (MYFACES-4060) Required attribute of h:inputFile tag is not working

Eduardo Breijo created MYFACES-4060:
---------------------------------------

             Summary: 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


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)