code: func ValidateResourceQuota(resourceQuota *api.ResourceQuota) field.ErrorList {
  	allErrs := ValidateObjectMeta(&resourceQuota.ObjectMeta, true, ValidateResourceQuotaName, field.NewPath("metadata"))
  
  	fldPath := field.NewPath("spec", "hard")
  	for k, v := range resourceQuota.Spec.Hard {
  		resPath := fldPath.Key(string(k))
  		allErrs = append(allErrs, validateResourceName(string(k), resPath)...)
  		allErrs = append(allErrs, validateResourceQuantityValue(string(k), v, resPath)...)
  	}
  	fldPath = field.NewPath("status", "hard")
  	for k, v := range resourceQuota.Status.Hard {
  		resPath := fldPath.Key(string(k))
  		allErrs = append(allErrs, validateResourceName(string(k), resPath)...)
  		allErrs = append(allErrs, validateResourceQuantityValue(string(k), v, resPath)...)
  	}
  	fldPath = field.NewPath("status", "used")
  	for k, v := range resourceQuota.Status.Used {
  		resPath := fldPath.Key(string(k))
  		allErrs = append(allErrs, validateResourceName(string(k), resPath)...)
  		allErrs = append(allErrs, validateResourceQuantityValue(string(k), v, resPath)...)
  	}
  	return allErrs
  }
docs: // ValidateResourceQuota tests if required fields in the ResourceQuota are set.