code: func (r Route) Validate() error {
  	if r.Domain.IsHTTP() {
  		if r.Port.IsSet {
  			return actionerror.InvalidHTTPRouteSettings{Domain: r.Domain.Name}
  		}
  		if r.Domain.IsShared() && r.Host == "" {
  			return actionerror.NoHostnameAndSharedDomainError{}
  		}
  	} else { // Is TCP Domain
  		if r.Host != "" || r.Path != "" {
  			return actionerror.InvalidTCPRouteSettings{Domain: r.Domain.Name}
  		}
  	}
  	return nil
  }
docs: // Validate will return an error if there are invalid HTTP or TCP settings for
  // it's given domain.