doubts about Regex using Primefaces

3

I have an input , where when a name is typed in the ex: João Da Silva field, > Regex . In this case, this field must be case sensitive. Now when I put space it does not save.

Follow the code:

<p:outputLabel value="Nome" for="nome" />
<p:inputText id="nome" value="#{cadastroClienteBean.cliente.nome}" size="40" maxlength="50" required="true">
<f:validateRegex pattern="[a-zA-Z]+" />
</p:inputText>
    
asked by anonymous 20.03.2017 / 20:11

1 answer

1

When you create a regular expression, you need to keep in mind what you want to match. I learned a lot about this with the Green Aries Regular Book of Expressions;

22.03.2017 / 20:28