code: func ValidatePreferredSchedulingTerms(terms []api.PreferredSchedulingTerm, fldPath *field.Path) field.ErrorList {
  	allErrs := field.ErrorList{}
  
  	for i, term := range terms {
  		if term.Weight <= 0 || term.Weight > 100 {
  			allErrs = append(allErrs, field.Invalid(fldPath.Index(i).Child("weight"), term.Weight, "must be in the range 1-100"))
  		}
  
  		allErrs = append(allErrs, ValidateNodeSelectorTerm(term.Preference, fldPath.Index(i).Child("preference"))...)
  	}
  	return allErrs
  }
docs: // ValidatePreferredSchedulingTerms tests that the specified SoftNodeAffinity fields has valid data