/** * Returns a shared JSR-303 validator instance to use. * * @return the validator to use */ public javax.validation.Validator getJavaxBeanValidator() { return getJavaxBeanValidatorFactory().getValidator(); }
/** * Returns the interpolated error message for the given constraint violation * using the locale specified for this validator. * * @param violation * the constraint violation * @param locale * the used locale * @return the localized error message */ protected String getMessage(ConstraintViolation<?> violation, Locale locale) { return getJavaxBeanValidatorFactory().getMessageInterpolator() .interpolate(violation.getMessageTemplate(), createContext(violation), locale); }