code: func ValidateKubeSchedulerLeaderElectionConfiguration(cc *config.KubeSchedulerLeaderElectionConfiguration, fldPath *field.Path) field.ErrorList {
  	allErrs := field.ErrorList{}
  	if !cc.LeaderElectionConfiguration.LeaderElect {
  		return allErrs
  	}
  	allErrs = append(allErrs, componentbasevalidation.ValidateLeaderElectionConfiguration(&cc.LeaderElectionConfiguration, field.NewPath("leaderElectionConfiguration"))...)
  	if len(cc.LockObjectNamespace) == 0 {
  		allErrs = append(allErrs, field.Required(fldPath.Child("lockObjectNamespace"), ""))
  	}
  	if len(cc.LockObjectName) == 0 {
  		allErrs = append(allErrs, field.Required(fldPath.Child("lockObjectName"), ""))
  	}
  	return allErrs
  }
docs: // ValidateKubeSchedulerLeaderElectionConfiguration ensures validation of the KubeSchedulerLeaderElectionConfiguration struct