Posts by Vitor • 1 point
1 post
-
0
votes2
answers3134
viewsA: Hibernate Validator @CPF that can be null
I decided as follows: @CPF @Column(nullable = true) private String cpf; public void setCpf(String cpf) { if(cpf != null && cpf.length() == 0) { this.cpf = null; } else { this.cpf = cpf; } }…