... 17            <p>All fields are required and must contain valid information</p>
18            <h:panelGrid columns=“3”>
19               <h:outputText value=“Name:”/>
20               <h:inputText id=“nameInputText” required=“true”
21                  requiredMessage=“Please enter your name”
22                  value=“#{validationBean.name}”
23                  validatorMessage=“Name must be fewer than 30 characters”>
24                  <f:validateLength maximum=“30” />
25               </h:inputText>
26               <h:message id=“nameMessage” for=“nameInputText”
27                  styleClass=error”/>                        
28               <h:outputText value=“E-mail:”/>
29               <h:inputText id=“emailInputText” required=“true”
30                  requiredMessage=“Please enter a valid e-mail address”
31                  value=“#{validationBean.email}”
32                  validatorMessage=“Invalid e-mail address format”>
33                  <f:validateRegex pattern=
34                     “\w+([-+.’]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*” ...

Get Java How to Program, Early Objects, 11th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.