On JBoss AS 7.1.1 using Moharra JSF 2,
an XHTML file created with an inputText element will not render the attribute required="true".
No errors but the output HTML does not contain the required attribute. If writing pure HTML input element the required attribute renders as part of the JSF form.
Anyone know why this attribute would be stripped out?
The case is a container managed login form so there is no backing bean. Many thanks in advance.
That’s expected behavior, that attribute is not for the HTML input tag, but for the required attribute of the UIInput component that stays on the server side.
See these related questions: