diff --git a/src/Tests/TMGMTUiTest.php b/src/Tests/TMGMTUiTest.php
index 35a5365..9df4e8d 100644
--- a/src/Tests/TMGMTUiTest.php
+++ b/src/Tests/TMGMTUiTest.php
@@ -719,6 +719,10 @@ class TMGMTUiTest extends TMGMTTestBase {
     $this->assertNoText($job_items[5]->label());
     // One de item is in the cart as it was not selected for checkout.
     $this->assertText($job_items[6]->label());
+
+    // Check to see if no items are selected and the error message pops up.
+    $this->drupalPostForm('admin/tmgmt/cart', array(), t('Request translation'));
+    $this->assertUniqueText(t("No job items were selected."));
   }
 
   /**
diff --git a/tmgmt.module b/tmgmt.module
index 154e66f..7ff9478 100644
--- a/tmgmt.module
+++ b/tmgmt.module
@@ -1066,7 +1066,7 @@ function tmgmt_source_add_to_cart_submit(array $form, FormStateInterface $form_s
 function tmgmt_cart_source_overview_validate(array $form, FormStateInterface $form_state) {
   $items = array_filter($form_state->getValue('items'));
   if (empty($items)) {
-    $form_state->setErrorByName('items', t('No job items were selected.'));
+    $form_state->setError($form, t('No job items were selected.'));
   }
 }
 
