code: func (s ConfigMapGeneratorV1) validate() error {
  	if len(s.Name) == 0 {
  		return fmt.Errorf("name must be specified")
  	}
  	if len(s.EnvFileSource) > 0 && (len(s.FileSources) > 0 || len(s.LiteralSources) > 0) {
  		return fmt.Errorf("from-env-file cannot be combined with from-file or from-literal")
  	}
  	return nil
  }
docs: // validate validates required fields are set to support structured generation.