code: func validateIngressBackend(backend *networking.IngressBackend, fldPath *field.Path) field.ErrorList {
  	allErrs := field.ErrorList{}
  
  	// All backends must reference a single local service by name, and a single service port by name or number.
  	if len(backend.ServiceName) == 0 {
  		return append(allErrs, field.Required(fldPath.Child("serviceName"), ""))
  	}
  	for _, msg := range apivalidation.ValidateServiceName(backend.ServiceName, false) {
  		allErrs = append(allErrs, field.Invalid(fldPath.Child("serviceName"), backend.ServiceName, msg))
  	}
  	allErrs = append(allErrs, apivalidation.ValidatePortNumOrName(backend.ServicePort, fldPath.Child("servicePort"))...)
  	return allErrs
  }
docs: // validateIngressBackend tests if a given backend is valid.