code: func validatePodAffinityTerm(podAffinityTerm core.PodAffinityTerm, fldPath *field.Path) field.ErrorList {
  	allErrs := field.ErrorList{}
  
  	allErrs = append(allErrs, unversionedvalidation.ValidateLabelSelector(podAffinityTerm.LabelSelector, fldPath.Child("matchExpressions"))...)
  	for _, name := range podAffinityTerm.Namespaces {
  		for _, msg := range ValidateNamespaceName(name, false) {
  			allErrs = append(allErrs, field.Invalid(fldPath.Child("namespace"), name, msg))
  		}
  	}
  	if len(podAffinityTerm.TopologyKey) == 0 {
  		allErrs = append(allErrs, field.Required(fldPath.Child("topologyKey"), "can not be empty"))
  	}
  	return append(allErrs, unversionedvalidation.ValidateLabelName(podAffinityTerm.TopologyKey, fldPath.Child("topologyKey"))...)
  }
docs: // validatePodAffinityTerm tests that the specified podAffinityTerm fields have valid data