I have a web application that is using Jersey2 to publish various REST services.
In this project, I am using the javax.validation annotations to validate the various inputs. However, I have some custom data types (Money, Percentage) where I would like to provide min and max validation in some cases.
However, if I annotate the field with @Min or @Max, I get an error message that there is no validator, which is the expected behavior, because my object is a complex data type.
I have successfully implemented a custom annotation with validator that provides this functionality, but I would prefer to reuse the existing annotation and supply my own validator for this data type, but I can't find any documentation on how to do this. Is it possible? If so, how do I register my custom validator for my data type?