code: func ValidateWebhook(w auditregistration.Webhook, fldPath *field.Path) field.ErrorList {
  	var allErrs field.ErrorList
  	if w.Throttle != nil {
  		allErrs = append(allErrs, ValidateWebhookThrottleConfig(w.Throttle, fldPath.Child("throttle"))...)
  	}
  
  	cc := w.ClientConfig
  	switch {
  	case (cc.URL == nil) == (cc.Service == nil):
  		allErrs = append(allErrs, field.Required(fldPath.Child("clientConfig"), "exactly one of url or service is required"))
  	case cc.URL != nil:
  		allErrs = append(allErrs, webhook.ValidateWebhookURL(fldPath.Child("clientConfig").Child("url"), *cc.URL, false)...)
  	case cc.Service != nil:
  		allErrs = append(allErrs, webhook.ValidateWebhookService(fldPath.Child("clientConfig").Child("service"), cc.Service.Name, cc.Service.Namespace, cc.Service.Path, cc.Service.Port)...)
  	}
  	return allErrs
  }
docs: // ValidateWebhook validates the webhook