I have problem with javax.validation.constraints.Pattern @Pattern validation.
@Pattern(regexp = "\\p{L}*", message = "Msg")
private String name;
When I'm trying to input any text it doesn't work.
When I used:
@Pattern(regexp = "[a-zA-Z]*", message = "Msg")
It works great with non latin characters.
You need to make the
\p{L}pattern Unicode aware with thePattern.UNICODE_CHARACTER_CLASSflag.Since you are using the string pattern, you may use the inline (embedded) flag variant,
(?U):