code: private void validateBean(Object bean) throws PropertyException
      {
          if (getValidatorFactory() != null) {
              Validator validator = getValidatorFactory().getValidator();
              Set<ConstraintViolation<Object>> constraintViolations = validator.validate(bean);
              if (!constraintViolations.isEmpty()) {
                  throw new PropertyException(
                      "Failed to validate bean: [" + constraintViolations.iterator().next().getMessage() + "]");
              }
          }
      }
docs: Validate populated values based on JSR 303.
  
  @param bean the bean to validate
  @throws PropertyException validation error