diff --git a/src/Plugin/EntityBrowser/Display/Modal.php b/src/Plugin/EntityBrowser/Display/Modal.php
index 0508d3d..2030c4f 100644
--- a/src/Plugin/EntityBrowser/Display/Modal.php
+++ b/src/Plugin/EntityBrowser/Display/Modal.php
@@ -166,6 +166,10 @@ public function selectionCompleted(array $entities) {
    * {@inheritdoc}
    */
   public function addAjax(array &$form) {
+    // Set a wrapper container to replace the form on ajax callback.
+    $form['#prefix'] = '<div id="entity-browser-form">';
+    $form['#suffix'] = '</div>';
+
     // Add the browser id to use in the FormAjaxController.
     $form['browser_id'] = array(
       '#type' => 'hidden',
@@ -174,7 +178,7 @@ public function addAjax(array &$form) {
 
     $form['actions']['submit']['#ajax'] = array(
       'callback' => array($this, 'widgetAjaxCallback'),
-      'wrapper' =>  $this->configuration['entity_browser_id'],
+      'wrapper' =>  'entity-browser-form',
     );
   }
 
@@ -189,6 +193,11 @@ public function addAjax(array &$form) {
    * @return \Drupal\Core\Ajax\AjaxResponse
    */
   public function widgetAjaxCallback(array &$form, FormStateInterface $form_state) {
+    // If we've got any validation error, print out the form again.
+    if ($form_state->hasAnyErrors()) {
+      return $form;
+    }
+
     $commands = $this->getAjaxCommands($form_state);
     $response = new AjaxResponse();
     foreach ($commands as $command) {
