code: func ValidateResourceRequirements(requirements *api.ResourceRequirements, fldPath *field.Path) field.ErrorList {
  	allErrs := field.ErrorList{}
  	limPath := fldPath.Child("limits")
  	for resourceName, quantity := range requirements.Limits {
  		fldPath := limPath.Key(string(resourceName))
  		// Validate resource name.
  		allErrs = append(allErrs, validateResourceName(string(resourceName), fldPath)...)
  		if api.IsStandardResourceName(string(resourceName)) {
  			allErrs = append(allErrs, validateBasicResource(quantity, fldPath.Key(string(resourceName)))...)
  		}
  		// Check that request <= limit.
  		requestQuantity, exists := requirements.Requests[resourceName]
  		if exists {
  			if quantity.Cmp(requestQuantity) < 0 {
  				allErrs = append(allErrs, field.Invalid(fldPath, quantity.String(), "must be greater than or equal to request"))
  			}
  		}
  	}
  	reqPath := fldPath.Child("requests")
  	for resourceName, quantity := range requirements.Requests {
  		fldPath := reqPath.Key(string(resourceName))
  		// Validate resource name.
  		allErrs = append(allErrs, validateResourceName(string(resourceName), fldPath)...)
  		if api.IsStandardResourceName(string(resourceName)) {
  			allErrs = append(allErrs, validateBasicResource(quantity, fldPath.Key(string(resourceName)))...)
  		}
  	}
  	return allErrs
  }
docs: // Validates resource requirement spec.