I'm differentiating validations to be run on the client vs. the server using validation groups.
However, I have one validation for which I'd like a different implementation the client, due to the unavailability of the Pattern class there. So on the client, I'd like to use the GWT RegExp class, while on the server, I'd like to use the JDK Pattern class.
So far, I've not figured out a way to do this. It seems like the only place to specify the validator class is in the validatedBy property of the @Constraint annotation.
I even tried creating two different custom validation annotations, but the validation framework still seems to load the server version, and I get a runtime error due to the unavailability of the Pattern class.
Thanks for any advice.