code: public long checkValidValue(long value, TemporalField field) {
          if (isValidValue(value) == false) {
              if (field != null) {
                  throw new DateTimeException("Invalid value for " + field + " (valid values " + this + "): " + value);
              } else {
                  throw new DateTimeException("Invalid value (valid values " + this + "): " + value);
              }
          }
          return value;
      }
docs: Checks that the specified value is valid.
  <p>
  This validates that the value is within the valid range of values.
  The field is only used to improve the error message.
  
  @param value  the value to check
  @param field  the field being checked, may be null
  @return the value that was passed in
  @see #isValidValue(long)