code: func validateNodeTaints(taints []core.Taint, fldPath *field.Path) field.ErrorList {
  	allErrors := field.ErrorList{}
  
  	uniqueTaints := map[core.TaintEffect]sets.String{}
  
  	for i, currTaint := range taints {
  		idxPath := fldPath.Index(i)
  		// validate the taint key
  		allErrors = append(allErrors, unversionedvalidation.ValidateLabelName(currTaint.Key, idxPath.Child("key"))...)
  		// validate the taint value
  		if errs := validation.IsValidLabelValue(currTaint.Value); len(errs) != 0 {
  			allErrors = append(allErrors, field.Invalid(idxPath.Child("value"), currTaint.Value, strings.Join(errs, ";")))
  		}
  		// validate the taint effect
  		allErrors = append(allErrors, validateTaintEffect(&currTaint.Effect, false, idxPath.Child("effect"))...)
  
  		// validate if taint is unique by <key, effect>
  		if len(uniqueTaints[currTaint.Effect]) > 0 && uniqueTaints[currTaint.Effect].Has(currTaint.Key) {
  			duplicatedError := field.Duplicate(idxPath, currTaint)
  			duplicatedError.Detail = "taints must be unique by key and effect pair"
  			allErrors = append(allErrors, duplicatedError)
  			continue
  		}
  
  		// add taint to existingTaints for uniqueness check
  		if len(uniqueTaints[currTaint.Effect]) == 0 {
  			uniqueTaints[currTaint.Effect] = sets.String{}
  		}
  		uniqueTaints[currTaint.Effect].Insert(currTaint.Key)
  	}
  	return allErrors
  }
docs: // validateNodeTaints tests if given taints have valid data.