code: func (c *Config) Validate(onExecution bool) error {
  	switch c.ImageVolumes {
  	case lib.ImageVolumesMkdir:
  	case lib.ImageVolumesIgnore:
  	case lib.ImageVolumesBind:
  	default:
  		return fmt.Errorf("unrecognized image volume type specified")
  	}
  
  	if err := c.Config.Validate(onExecution); err != nil {
  		return errors.Wrapf(err, "library config validation")
  	}
  
  	if c.UIDMappings != "" && c.ManageNetworkNSLifecycle {
  		return fmt.Errorf("cannot use UIDMappings with ManageNetworkNSLifecycle")
  	}
  	if c.GIDMappings != "" && c.ManageNetworkNSLifecycle {
  		return fmt.Errorf("cannot use GIDMappings with ManageNetworkNSLifecycle")
  	}
  
  	if c.LogSizeMax >= 0 && c.LogSizeMax < oci.BufSize {
  		return fmt.Errorf("log size max should be negative or >= %d", oci.BufSize)
  	}
  
  	return nil
  }
docs: // Validate is the main entry point for configuration validation
  // The parameter `onExecution` specifies if the validation should include
  // execution checks. It returns an `error` on validation failure, otherwise
  // `nil`.