diff --git a/core/modules/editor/editor.admin.inc b/core/modules/editor/editor.admin.inc
index 83bc2cf..42e89d0 100644
--- a/core/modules/editor/editor.admin.inc
+++ b/core/modules/editor/editor.admin.inc
@@ -5,6 +5,7 @@
  * Administration functions for editor.module.
  */
 
+use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\StreamWrapper\StreamWrapperInterface;
 use Drupal\editor\Entity\Editor;
 
@@ -96,6 +97,7 @@ function editor_image_upload_settings_form(Editor $editor) {
     '#field_suffix' => '</div>',
     '#description' => t('Images larger than these dimensions will be scaled down.'),
     '#states' => $show_if_image_uploads_enabled,
+    '#element_validate' => array('editor_image_upload_settings_validate_dimension'),
   );
   $form['max_dimensions']['width'] = array(
     '#title' => t('Width'),
@@ -126,3 +128,21 @@ function editor_image_upload_settings_form(Editor $editor) {
 
   return $form;
 }
+
+/**
+ * #element_validate handler for the "max_dimensions" element in
+ * editor_image_upload_settings_form().
+ *
+ * Validates that both the height and width dimensions have been provided.
+ */
+function editor_image_upload_settings_validate_dimension(array $element, FormStateInterface $form_state) {
+  $dimensions = $form_state->getValue(array('editor', 'settings', 'plugins', 'drupalimage', 'image_upload', 'max_dimensions'));
+  if (!empty($dimensions['width']) || !empty($dimensions['height'])) {
+    foreach ($dimensions as $dimension => $value) {
+      if (!$value) {
+        $form_state->setError($element[$dimension], t('Both a height and width value must be specified in the %name field.', array('%name' => $element['#title'])));
+        return;
+      }
+    }
+ }
+}
diff --git a/core/modules/editor/src/Tests/EditorSettingsValidationTest.php b/core/modules/editor/src/Tests/EditorSettingsValidationTest.php
new file mode 100644
index 0000000..8b5312a
--- /dev/null
+++ b/core/modules/editor/src/Tests/EditorSettingsValidationTest.php
@@ -0,0 +1,120 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\editor\Tests\EditorSettingsValidationTest.
+ */
+
+namespace Drupal\editor\Tests;
+
+use Drupal\editor\Entity\Editor;
+use Drupal\filter\Entity\FilterFormat;
+use Drupal\simpletest\WebTestBase;
+
+/**
+ * Tests dimension validation of Editor image settings.
+ *
+ * @group editor
+ */
+class EditorSettingsValidationTest extends WebTestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = ['editor', 'ckeditor'];
+
+  /**
+   * A user with permission as administer for testing.
+   *
+   * @var \Drupal\user\Entity\User
+   */
+  protected $adminUser;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+
+    // Add text format.
+    FilterFormat::create([
+      'format' => 'basic_html',
+      'name' => 'Basic HTML',
+      'weight' => 0,
+    ])->save();
+
+    // Set up text editor.
+    Editor::create([
+      'format' => 'basic_html',
+      'editor' => 'ckeditor',
+      'image_upload' => [
+        'max_dimensions' => [
+          'width' => '',
+          'height' => '',
+        ],
+      ],
+    ])->save();
+
+    // Create admin user.
+    $this->adminUser = $this->drupalCreateUser(['administer filters']);
+    $this->drupalLogin($this->adminUser);
+  }
+
+  /**
+   * Tests dimension validation.
+   */
+  public function testEditorSettingsValidation() {
+    // Case 1: Set width but don't set height and submit the form which should
+    // return a validation error while the editor "max_dimensions" width and
+    // height should be empty.
+    $this->drupalGet('admin/config/content/formats/manage/basic_html');
+    $this->setMaxDimensions('300', '');
+    $this->assertRaw(t('Both a height and width value must be specified in the %name field.', ['%name' => 'Maximum dimensions']));
+    $this->assertSavedMaxDimensions('', '');
+
+    // Case 2: Set height but don't set width and submit the form which should
+    // return a validation error while the editor "max_dimensions" width and
+    // height should be empty.
+    $this->drupalGet('admin/config/content/formats/manage/basic_html');
+    $this->setMaxDimensions('', '400');
+    $this->assertRaw(t('Both a height and width value must be specified in the %name field.', ['%name' => 'Maximum dimensions']));
+    $this->assertSavedMaxDimensions('', '');
+
+    // Case 3: Set both height and width and submit the form which should return
+    // a success message while the editor "max_dimensions" width and height
+    // should equal the ones submitted.
+    $this->drupalGet('admin/config/content/formats/manage/basic_html');
+    $width = '123';
+    $height = '456';
+    $this->setMaxDimensions($width, $height);
+    $this->assertSavedMaxDimensions($width, $height);
+    $this->assertRaw(t('The text format %format has been updated.', ['%format' => 'Basic HTML']));
+
+    // Case 4: Set both height and width as empty values and submit the form
+    // which should return a success message while the editor "max_dimensions"
+    // width and height should be empty.
+    $this->drupalGet('admin/config/content/formats/manage/basic_html');
+    $width = '';
+    $height = '';
+    $this->setMaxDimensions($width, $height);
+    $this->assertSavedMaxDimensions($width, $height);
+    $this->assertRaw(t('The text format %format has been updated.', ['%format' => 'Basic HTML']));
+  }
+
+  protected function setMaxDimensions($width = '', $height = '') {
+    $edit = [];
+    $edit['editor[settings][plugins][drupalimage][image_upload][max_dimensions][width]'] = $width;
+    $edit['editor[settings][plugins][drupalimage][image_upload][max_dimensions][height]'] = $height;
+    $this->drupalPostForm(NULL, $edit, t('Save configuration'));
+  }
+
+  protected function assertSavedMaxDimensions($width = '', $height = '') {
+    $editor = Editor::load('basic_html');
+    $image_upload_settings = $editor->getImageUploadSettings();
+    $this->assertEqual($width, $image_upload_settings['max_dimensions']['width']);
+    $this->assertEqual($height, $image_upload_settings['max_dimensions']['height']);
+  }
+
+}
