code: func validateWeightedPodAffinityTerms(weightedPodAffinityTerms []core.WeightedPodAffinityTerm, fldPath *field.Path) field.ErrorList {
  	allErrs := field.ErrorList{}
  	for j, weightedTerm := range weightedPodAffinityTerms {
  		if weightedTerm.Weight <= 0 || weightedTerm.Weight > 100 {
  			allErrs = append(allErrs, field.Invalid(fldPath.Index(j).Child("weight"), weightedTerm.Weight, "must be in the range 1-100"))
  		}
  		allErrs = append(allErrs, validatePodAffinityTerm(weightedTerm.PodAffinityTerm, fldPath.Index(j).Child("podAffinityTerm"))...)
  	}
  	return allErrs
  }
docs: // validateWeightedPodAffinityTerms tests that the specified weightedPodAffinityTerms fields have valid data