I currently galley with data validation via Hibernate. Especially with the @Pattern annotation
Wholesale verification is always false, no matter what I do, so I can not save the object.
I try this, among other things:
@NotNull
@Size(max=30)
@SafeHtml
@Pattern(regexp="[a-zA-Z]", messsage="the name can only contain letters")
private String name;
et ceci :
@NotNull
@Size(max=30)
@SafeHtml
@Pattern(regexp="\\D", messsage="the name can only contain letters")
private String name;
In both case, if i write "toto," I have the error message that appears.
Someone an idea?