code: func validatePodAntiAffinity(podAntiAffinity *core.PodAntiAffinity, fldPath *field.Path) field.ErrorList {
  	allErrs := field.ErrorList{}
  	// TODO:Uncomment below code once RequiredDuringSchedulingRequiredDuringExecution is implemented.
  	// if podAntiAffinity.RequiredDuringSchedulingRequiredDuringExecution != nil {
  	//	allErrs = append(allErrs, validatePodAffinityTerms(podAntiAffinity.RequiredDuringSchedulingRequiredDuringExecution, false,
  	//		fldPath.Child("requiredDuringSchedulingRequiredDuringExecution"))...)
  	//}
  	if podAntiAffinity.RequiredDuringSchedulingIgnoredDuringExecution != nil {
  		allErrs = append(allErrs, validatePodAffinityTerms(podAntiAffinity.RequiredDuringSchedulingIgnoredDuringExecution,
  			fldPath.Child("requiredDuringSchedulingIgnoredDuringExecution"))...)
  	}
  	if podAntiAffinity.PreferredDuringSchedulingIgnoredDuringExecution != nil {
  		allErrs = append(allErrs, validateWeightedPodAffinityTerms(podAntiAffinity.PreferredDuringSchedulingIgnoredDuringExecution,
  			fldPath.Child("preferredDuringSchedulingIgnoredDuringExecution"))...)
  	}
  	return allErrs
  }
docs: // validatePodAntiAffinity tests that the specified podAntiAffinity fields have valid data