code: func ValidateNodeFieldSelectorRequirement(req core.NodeSelectorRequirement, fldPath *field.Path) field.ErrorList {
  	allErrs := field.ErrorList{}
  
  	switch req.Operator {
  	case core.NodeSelectorOpIn, core.NodeSelectorOpNotIn:
  		if len(req.Values) != 1 {
  			allErrs = append(allErrs, field.Required(fldPath.Child("values"),
  				"must be only one value when `operator` is 'In' or 'NotIn' for node field selector"))
  		}
  	default:
  		allErrs = append(allErrs, field.Invalid(fldPath.Child("operator"), req.Operator, "not a valid selector operator"))
  	}
  
  	if vf, found := nodeFieldSelectorValidators[req.Key]; !found {
  		allErrs = append(allErrs, field.Invalid(fldPath.Child("key"), req.Key, "not a valid field selector key"))
  	} else {
  		for i, v := range req.Values {
  			for _, msg := range vf(v, false) {
  				allErrs = append(allErrs, field.Invalid(fldPath.Child("values").Index(i), v, msg))
  			}
  		}
  	}
  
  	return allErrs
  }
docs: // ValidateNodeFieldSelectorRequirement tests that the specified NodeSelectorRequirement fields has valid data