Created
June 4, 2018 12:47
-
-
Save nosrednawall/dd8cd56232f6acd744d4bcbd3f07e8cb to your computer and use it in GitHub Desktop.
Validador de email regex jsf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p:outputLabel value="Email:" for="email" /> | |
<p:inputText id="email" value="#{seuBeanAqui}" | |
required="true" validatorMessage="Email inválido"> | |
<f:attribute name="type" value="email" /> | |
<f:passThroughAttribute name="placeholder" value="E-mail" /> | |
<f:validateRegex | |
pattern="[\w\.-]*[a-zA-Z0-9_]@[\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]" /> | |
<f:ajax event="blur" render="messageEmail" /> | |
</p:inputText> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment