You can write your own ConstraintValidator:
https://docs.oracle.com/javaee/7/api/javax/validation/ConstraintValidator.html
Where you can provide annotation and validation type
for which you can define your logic
And then you can annotate your field with your custom annotation
Here is link with steps how to make it :
https://dzone.com/articles/create-your-own-constraint-with-bean-validation-20
As per javax validation documentation :
@Pattern(regex=, flag=) String.
Additionally supported by HV: any sub-type of CharSequence.
Checks if the annotated string matches the regular expression regex considering the given flag
So actually with Character using @Pattern you will get the error
Thanks