I think my problem is simple enough, but I can't seem to overcome it. I'm using an input text for emails like this:
<h:outputLabel value="Mail:" for="mail" />
<p:inputText id="mail" value="#{UtilisateurBean.mail}"
title="Mail" validator="#{UtilisateursValidate.email}"
validatorMessage="ecrivez un mail valide">
<f:validateRegex
pattern="[\w\.-]*[a-zA-Z0-9_]@[\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]" />
<f:validateLength minimum="2" />
The problem is that it doesn't support the dot character before the @ like nouraty.n@mail.com (which is usually the case for gmail). I tried stuff like:
pattern="[\w\.-]*[a-zA-Z0-9._%-]@[\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]"
pattern="[\w\.-]*[a-zA-Z0-9\._%-]@[\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]"
But no luck. Can anyone suggest a solution for this issue?