code: func ValidateFinalizers(finalizers []string, fldPath *field.Path) field.ErrorList {
  	allErrs := field.ErrorList{}
  	hasFinalizerOrphanDependents := false
  	hasFinalizerDeleteDependents := false
  	for _, finalizer := range finalizers {
  		allErrs = append(allErrs, ValidateFinalizerName(finalizer, fldPath)...)
  		if finalizer == metav1.FinalizerOrphanDependents {
  			hasFinalizerOrphanDependents = true
  		}
  		if finalizer == metav1.FinalizerDeleteDependents {
  			hasFinalizerDeleteDependents = true
  		}
  	}
  	if hasFinalizerDeleteDependents && hasFinalizerOrphanDependents {
  		allErrs = append(allErrs, field.Invalid(fldPath, finalizers, fmt.Sprintf("finalizer %s and %s cannot be both set", metav1.FinalizerOrphanDependents, metav1.FinalizerDeleteDependents)))
  	}
  	return allErrs
  }
docs: // ValidateFinalizers tests if the finalizers name are valid, and if there are conflicting finalizers.