Something like that private static final ValidatorFactory VALIDATOR_FACTORY = Validation.buildDefaultValidatorFactory(); private static final TraversableResolver TRAVERSABLE_RESOLVER = new DefaultTraversableResolver(); private static final MessageInterpolator NO_INTERPOLATION_MESSAGE_INTERPOLATOR = new MyMessageInterpolator(); ... Validator getValidator() { ConstraintValidatorFactory constraintValidatorFactory = new ConstraintValidatorFactoryImpl(); Validator validator = VALIDATOR_FACTORY.usingContext() .traversableResolver(TRAVERSABLE_RESOLVER) .messageInterpolator(NO_INTERPOLATION_MESSAGE_INTERPOLATOR) .constraintValidatorFactory(constraintValidatorFactory) .getValidator(); Validator reinterpretingValidator = new ReinterpolatingValidator(validator); return reinterpretingValidator; } .... Validator validator = getValidator(); validator.validate(object, new Class<?>[] {MyCustomGroup.class} ) |