code: public void validate() throws ValidationException {
  
          /*
           * ; the following are optional, ; but MUST NOT occur more than once (";" "VALUE" "=" ("DATE-TIME" / "DATE")) /
           * (";" tzidparam) /
           */
  
          /*
           * ; the following is optional, ; and MAY occur more than once (";" xparam)
           */
  
          ParameterValidator.getInstance().assertOneOrLess(Parameter.VALUE,
                  getParameters());
  
          if (isUtc()) {
              ParameterValidator.getInstance().assertNone(Parameter.TZID,
                      getParameters());
          } else {
              ParameterValidator.getInstance().assertOneOrLess(Parameter.TZID,
                      getParameters());
          }
  
          final Value value = getParameter(Parameter.VALUE);
  
          if (getDate() instanceof DateTime) {
  
              if (value != null && !Value.DATE_TIME.equals(value)) {
                  throw new ValidationException("VALUE parameter [" + value
                          + "] is invalid for DATE-TIME instance");
              }
  
              final DateTime dateTime = (DateTime) date;
  
              // ensure tzid matches date-time timezone..
              final Parameter tzId = getParameter(Parameter.TZID);
              if (dateTime.getTimeZone() != null
                      && (tzId == null || !tzId.getValue().equals(
                      dateTime.getTimeZone().getID()))) {
  
                  throw new ValidationException("TZID parameter [" + tzId
                          + "] does not match the timezone ["
                          + dateTime.getTimeZone().getID() + "]");
              }
          } else if (getDate() != null) {
  
              if (value == null) {
                  throw new ValidationException("VALUE parameter [" + Value.DATE
                          + "] must be specified for DATE instance");
              } else if (!Value.DATE.equals(value)) {
                  throw new ValidationException("VALUE parameter [" + value
                          + "] is invalid for DATE instance");
              }
          }
      }
docs: {@inheritDoc}