How to “ignore”: jakarta.validation.UnexpectedTypeException: No validator could be found for constraint ‘jakarta.validation.constraints.Pattern’
I read that the usage of @jakarta.validation.constraints.Pattern
should be used on return types of Charset
. The issue that I am facing is that in my case, I am using generated java files from some gradle tasks that puts the Patterns on all getter methods, no matter the return type. At time of generation it is difficult to determine whether the return type is String or not, so the Pattern annotations are set on all the getter methods.