1617181920212223
Set<ConstraintViolation<T>> constraintViolations = validator.validate(object); if (!constraintViolations.isEmpty()) { throw new ValidationException(); } }