diff --git a/src/Form/WebformAjaxFormTrait.php b/src/Form/WebformAjaxFormTrait.php
index 5ea62fe5..7ae5f603 100644
--- a/src/Form/WebformAjaxFormTrait.php
+++ b/src/Form/WebformAjaxFormTrait.php
@@ -2,7 +2,9 @@
 
 namespace Drupal\webform\Form;
 
+use Drupal\Component\Serialization\Json;
 use Drupal\Core\Ajax\AjaxResponse;
+use Drupal\Core\Ajax\AlertCommand;
 use Drupal\Core\Ajax\HtmlCommand;
 use Drupal\Core\EventSubscriber\MainContentViewSubscriber;
 use Drupal\Core\Form\FormStateInterface;
@@ -165,6 +167,9 @@ trait WebformAjaxFormTrait {
     // Ajax callback for confirmation back to link.
     $form['#attached']['library'][] = 'webform/webform.ajax';
 
+    // Add validate Ajax form.
+    $form['#validate'][] = '::validateAjaxForm';
+
     return $form;
   }
 
@@ -221,6 +226,29 @@ trait WebformAjaxFormTrait {
     return $response;
   }
 
+ /**
+   * Validate form #ajax callback.
+   *
+   * @param array $form
+   *   An associative array containing the structure of the form.
+   * @param \Drupal\Core\Form\FormStateInterface $form_state
+   *   The current state of the form.
+   */
+  public function validateAjaxForm(array &$form, FormStateInterface $form_state) {
+    // Make sure the ajax callback exists.
+    // @see \Drupal\Core\Form\FormAjaxResponseBuilder::buildResponse
+    $callback = NULL;
+    if (($triggering_element = $form_state->getTriggeringElement()) && isset($triggering_element['#ajax']['callback'])) {
+      $callback = $triggering_element['#ajax']['callback'];
+    }
+    $callback = $form_state->prepareCallback($callback);
+    if (empty($callback) || !is_callable($callback)) {
+      $command = new AlertCommand($this->t('Unable to complete the request. Please reload the current page.'));
+      print Json::encode([$command->render()]);
+      exit;
+    }
+  }
+
   /**
    * Empty submit callback used to only have the submit button to use an #ajax submit callback.
    *
