diff --git a/core/modules/editor/editor.admin.inc b/core/modules/editor/editor.admin.inc
index 83bc2cf..544a553 100644
--- a/core/modules/editor/editor.admin.inc
+++ b/core/modules/editor/editor.admin.inc
@@ -96,6 +96,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 +127,15 @@ function editor_image_upload_settings_form(Editor $editor) {
 
   return $form;
 }
+
+function editor_image_upload_settings_validate_dimension($element, &$form_state) {
+  if (!empty($element['width']['#value']) || !empty($element['height']['#value'])) {
+    foreach (array('width', 'height') as $dimension) {
+      if (!$element[$dimension]['#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..f60a450
--- /dev/null
+++ b/core/modules/editor/src/Tests/EditorSettingsValidationTest.php
@@ -0,0 +1,196 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\editor\Tests\EditorSettingsValidationTest.
+ */
+
+namespace Drupal\editor\Tests;
+
+use Drupal\simpletest\WebTestBase;
+
+/**
+ * Test for dimension validation of Editor image settings
+ *
+ * @group editor
+ */
+class EditorSettingsValidationTest extends WebTestBase {
+
+  /**
+   * The profile to install as a basis for testing.
+   *
+   * Using the standard profile to test editor image settings.
+   *
+   * @var string
+   */
+  protected $profile = 'standard';
+
+  /**
+   * A user with permission as administer for testing.
+   *
+   * @var \Drupal\user\Entity\User
+   */
+  protected $adminUser;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+    $this->adminUser = $this->drupalCreateUser(array('administer filters'));
+    $this->drupalLogin($this->adminUser);
+
+    //Initialize the max dimension value to empty
+    $editor = entity_load('editor', 'basic_html');
+    $image_upload_settings = $editor->getImageUploadSettings();
+    $image_upload_settings['max_dimensions']['width'] = '';
+    $image_upload_settings['max_dimensions']['height'] = '';
+    $editor->setImageUploadSettings($image_upload_settings);
+    $editor->save();
+
+  }
+
+  /**
+   * Tests dimension validation.
+   */
+  public function testEditorSettingsValidation() {
+
+    //Case 1 - With have value, Height Empty
+    //         Expected Result: Validation error and message show
+
+    $this->drupalGet('admin/config/content/formats/manage/basic_html');
+    $this->assertResponse(200);
+    $this->assertUrl('admin/config/content/formats/manage/basic_html');
+
+    //Set the case value
+    $width = '300';
+    $height = '';
+    $edit = array();
+    $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'));
+
+    //Check for error message
+    $this->assertRaw(t('Both a height and width value must be specified in the @name field.', array('@name' => 'Maximum dimensions')));
+
+    //Check for editor setting value
+    $editor = entity_load('editor', 'basic_html');
+    $image_upload_settings = $editor->getImageUploadSettings();
+    if (($image_upload_settings['max_dimensions']['width'] == '') && ($image_upload_settings['max_dimensions']['height'] == ''))
+    {
+      $dimensions_no_change = true;
+    }
+    else
+    {
+      $dimensions_no_change = false;
+    }
+    $this->assertTrue($dimensions_no_change, 'Max dimensions settings had not been updated.');
+
+
+
+
+    //Case 2 - Test for width field valus is empty, height field had provided value
+    //         Expected Result: Validation error and message show
+
+    $this->drupalGet('admin/config/content/formats/manage/basic_html');
+    $this->assertResponse(200);
+    $this->assertUrl('admin/config/content/formats/manage/basic_html');
+
+    //Set the case value
+    $width = '';
+    $height = '400';
+    $edit = array();
+    $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'));
+
+    //Check for error message
+    $this->assertRaw(t('Both a height and width value must be specified in the @name field.', array('@name' => 'Maximum dimensions')));
+
+    //Check for editor setting value
+    $editor = entity_load('editor', 'basic_html');
+    $image_upload_settings = $editor->getImageUploadSettings();
+    if (($image_upload_settings['max_dimensions']['width'] == '') && ($image_upload_settings['max_dimensions']['height'] == ''))
+    {
+      $dimensions_no_change = true;
+    }
+    else
+    {
+      $dimensions_no_change = false;
+    }
+    $this->assertTrue($dimensions_no_change, 'Max dimensions settings had not been updated.');
+
+
+
+    //Case 3 - Test for both width field and height with value
+    //         Expected Result: Validation pass and setting updated
+
+    $this->drupalGet('admin/config/content/formats/manage/basic_html');
+    $this->assertResponse(200);
+    $this->assertUrl('admin/config/content/formats/manage/basic_html');
+
+    //Set the case value
+    $width = '123';
+    $height = '456';
+    $edit = array();
+    $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'));
+
+
+    $editor = entity_load('editor', 'basic_html');
+    $image_upload_settings = $editor->getImageUploadSettings();
+    if (($image_upload_settings['max_dimensions']['width'] == $width) && ($image_upload_settings['max_dimensions']['height'] == $height))
+    {
+      $dimensions_updated = true;
+    }
+    else
+    {
+      $dimensions_updated = false;
+    }
+    $this->assertTrue($dimensions_updated, 'Max dimensions settings is updated properly.');
+
+    //Check for the successful message
+    $this->assertRaw(t('The text format %format has been updated.', array('%format' => 'Basic HTML')));
+
+    //Check for the return page
+    $this->assertUrl('admin/config/content/formats');
+
+
+    //Case 4 - Test for both width field and height are Empty
+    //         Expected Result: Validation pass and setting updated
+
+    $this->drupalGet('admin/config/content/formats/manage/basic_html');
+    $this->assertResponse(200);
+    $this->assertUrl('admin/config/content/formats/manage/basic_html');
+
+    //Set the case value
+    $width = '';
+    $height = '';
+    $edit = array();
+    $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'));
+
+    $editor = entity_load('editor', 'basic_html');
+    $image_upload_settings = $editor->getImageUploadSettings();
+    if (($image_upload_settings['max_dimensions']['width'] == $width) && ($image_upload_settings['max_dimensions']['height'] == $height))
+    {
+      $dimensions_updated = true;
+    }
+    else
+    {
+      $dimensions_updated = false;
+    }
+    $this->assertTrue($dimensions_updated, 'Max dimensions settings is updated properly.');
+
+    //Check for the successful message
+    $this->assertRaw(t('The text format %format has been updated.', array('%format' => 'Basic HTML')));
+
+    //Check for the return page
+    $this->assertUrl('admin/config/content/formats');
+
+  }
+
+
+}
