[
https://issues.apache.org/jira/browse/MYFACES-4060?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Leonardo Uribe updated MYFACES-4060:
------------------------------------
Resolution: Fixed
Assignee: Leonardo Uribe
Fix Version/s: 2.2.11
Status: Resolved (was: Patch Available)
> 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
> Assignee: Leonardo Uribe
> Fix For: 2.2.11
>
> Attachments: MYFACES-4060-2.patch, 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)