code: func (s *ServiceDefinition) Validate() error {
  	var result error
  
  	if s.Kind == ServiceKindTypical {
  		if s.Connect != nil {
  			if s.Connect.Proxy != nil {
  				if s.Connect.Native {
  					result = multierror.Append(result, fmt.Errorf(
  						"Services that are Connect native may not have a proxy configuration"))
  				}
  
  				if s.Port == 0 {
  					result = multierror.Append(result, fmt.Errorf(
  						"Services with a Connect managed proxy must have a port set"))
  				}
  			}
  		}
  	}
  
  	// Validate the NodeService which covers a lot
  	if err := s.NodeService().Validate(); err != nil {
  		result = multierror.Append(result, err)
  	}
  
  	return result
  }
docs: // Validate validates the service definition. This also calls the underlying
  // Validate method on the NodeService.
  //
  // NOTE(mitchellh): This currently only validates fields related to Connect
  // and is incomplete with regards to other fields.