code: func (a *AdmissionOptions) Validate() []error {
  	if a == nil {
  		return nil
  	}
  
  	errs := []error{}
  
  	registeredPlugins := sets.NewString(a.Plugins.Registered()...)
  	for _, name := range a.EnablePlugins {
  		if !registeredPlugins.Has(name) {
  			errs = append(errs, fmt.Errorf("enable-admission-plugins plugin %q is unknown", name))
  		}
  	}
  
  	for _, name := range a.DisablePlugins {
  		if !registeredPlugins.Has(name) {
  			errs = append(errs, fmt.Errorf("disable-admission-plugins plugin %q is unknown", name))
  		}
  	}
  
  	enablePlugins := sets.NewString(a.EnablePlugins...)
  	disablePlugins := sets.NewString(a.DisablePlugins...)
  	if len(enablePlugins.Intersection(disablePlugins).List()) > 0 {
  		errs = append(errs, fmt.Errorf("%v in enable-admission-plugins and disable-admission-plugins "+
  			"overlapped", enablePlugins.Intersection(disablePlugins).List()))
  	}
  
  	// Verify RecommendedPluginOrder.
  	recommendPlugins := sets.NewString(a.RecommendedPluginOrder...)
  	intersections := registeredPlugins.Intersection(recommendPlugins)
  	if !intersections.Equal(recommendPlugins) {
  		// Developer error, this should never run in.
  		errs = append(errs, fmt.Errorf("plugins %v in RecommendedPluginOrder are not registered",
  			recommendPlugins.Difference(intersections).List()))
  	}
  	if !intersections.Equal(registeredPlugins) {
  		// Developer error, this should never run in.
  		errs = append(errs, fmt.Errorf("plugins %v registered are not in RecommendedPluginOrder",
  			registeredPlugins.Difference(intersections).List()))
  	}
  
  	return errs
  }
docs: // Validate verifies flags passed to AdmissionOptions.