code: func Validate(config *Config) error {
  	// validate DNS
  	for _, dns := range config.DNS {
  		if _, err := opts.ValidateIPAddress(dns); err != nil {
  			return err
  		}
  	}
  
  	// validate DNSSearch
  	for _, dnsSearch := range config.DNSSearch {
  		if _, err := opts.ValidateDNSSearch(dnsSearch); err != nil {
  			return err
  		}
  	}
  
  	// validate Labels
  	for _, label := range config.Labels {
  		if _, err := opts.ValidateLabel(label); err != nil {
  			return err
  		}
  	}
  	// validate MaxConcurrentDownloads
  	if config.MaxConcurrentDownloads != nil && *config.MaxConcurrentDownloads < 0 {
  		return fmt.Errorf("invalid max concurrent downloads: %d", *config.MaxConcurrentDownloads)
  	}
  	// validate MaxConcurrentUploads
  	if config.MaxConcurrentUploads != nil && *config.MaxConcurrentUploads < 0 {
  		return fmt.Errorf("invalid max concurrent uploads: %d", *config.MaxConcurrentUploads)
  	}
  
  	// validate that "default" runtime is not reset
  	if runtimes := config.GetAllRuntimes(); len(runtimes) > 0 {
  		if _, ok := runtimes[StockRuntimeName]; ok {
  			return fmt.Errorf("runtime name '%s' is reserved", StockRuntimeName)
  		}
  	}
  
  	if _, err := ParseGenericResources(config.NodeGenericResources); err != nil {
  		return err
  	}
  
  	if defaultRuntime := config.GetDefaultRuntimeName(); defaultRuntime != "" && defaultRuntime != StockRuntimeName {
  		runtimes := config.GetAllRuntimes()
  		if _, ok := runtimes[defaultRuntime]; !ok {
  			return fmt.Errorf("specified default runtime '%s' does not exist", defaultRuntime)
  		}
  	}
  
  	// validate platform-specific settings
  	return config.ValidatePlatformConfig()
  }
docs: // Validate validates some specific configs.
  // such as config.DNS, config.Labels, config.DNSSearch,
  // as well as config.MaxConcurrentDownloads, config.MaxConcurrentUploads.