p:First faces is showing twice the CPF name

Asked

Viewed 93 times

1

My primefaces p:Growl is showing twice the CPF name when Cpf is invalid. I am using bean validation.

inserir a descrição da imagem aqui

      <p:outputLabel for="cpf" value="CPF"  rendered="#{cadastroClienteBean.CPF}"/>
                    <p:inputMask id="cpf" label="CPF" mask="999.999.999-99"  placeholder="___.___.___-__"
                                 value="#{cadastroClienteBean.cliente.documentoReceitaFedral}" size="14"
                                 rendered="#{cadastroClienteBean.CPF}" required="true" 
                                 requiredMessage="CPF deve ser informado">
                    </p:inputMask>





@CPF
@Column(name = "doc_receita_federal", length = 14)
public String getDocumentoReceitaFedral() {
    return documentoReceitaFedral;
}
  • Post the code.

  • @Laerte, sorry. I posted in the question

  • As your <p:Growl is written />?

  • @Marcossousa like this. ' <p:Growl autoUpdate="true" />'

1 answer

2


There are several ways to solve. One of them and edit the CPF validator message @CPF(message="CPF Invalido")

  • I already did this and did not solve it. In the two CPF and CNPJ validation fields you have this error.

  • 1

    Take the CPF from the @CPF(message="Invalid") message - the field name comes by default by the component label field.

  • It worked out! Thank you very much

Browser other questions tagged

You are not signed in. Login or sign up in order to post.