private void validationParamUser(User user){ ValidatorFactory factory = Validation.buildDefaultValidatorFactory(); Validator validator = factory.getValidator(); Set<ConstraintViolation<User>> violationSet = validator.validate(user); for(ConstraintViolation<User> violation : violationSet){ System.out.println(violation.getMessage()); }
}