src/main/java/org/odessajavaclub/shared/Validating.java
public <T> void validate(T object) {
    Set<ConstraintViolation<T>> violations = validator.validate(object);
    if (!violations.isEmpty()) {
      throw new ConstraintViolationException(violations);
    }
  }
/**
   * Validates {@code object} and throws {@link ConstraintViolationException} if it is invalid.
   *
   * @param object input object to be validated
   * @param <T>    type of input object
   * @throws ConstraintViolationException if input object is invalid
   */
Validates  object and throws  ConstraintViolationException if it is invalid.
@param object input object to be validated
@param     type of input object
@throws ConstraintViolationException if input object is invalid
Validates object and throws ConstraintViolationException if it is invalid . @param object input object to be validated @param type of input object @throws ConstraintViolationException if input object is invalid
public <T> void validate(T object) {
    Set<ConstraintViolation<T>> violations = validator.validate(object);
    if (!violations.isEmpty()) {
      throw new ConstraintViolationException(violations);
    }
  }
public < T > void validate ( T object ) { Set < ConstraintViolation < T > > violations = validator . validate ( object ) ; if ( ! violations . isEmpty ( ) ) { throw new ConstraintViolationException ( violations ) ; } }
Validates {@code object} and throws {@link ConstraintViolationException} if it is invalid.
Validates { @code object } and throws { @link ConstraintViolationException } if it is invalid .