diff --git a/core/includes/form.inc b/core/includes/form.inc
index 7131a7b..9e3e077 100644
--- a/core/includes/form.inc
+++ b/core/includes/form.inc
@@ -615,12 +615,12 @@ function form_type_token_value($element, $input = FALSE) {
  * Changes submitted form values during form validation.
  *
  * @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
- *   Use \Drupal::formBuilder()->setValue().
+ *   Use $form_state->setValueForElement().
  *
- * @see \Drupal\Core\Form\FormBuilderInterface::setValue().
+ * @see \Drupal\Core\Form\FormStateInterface::setValueForElement().
  */
 function form_set_value($element, $value, FormStateInterface $form_state) {
-  \Drupal::formBuilder()->setValue($element, $value, $form_state);
+  $form_state->setValueForElement($element, $value);
 }
 
 /**
diff --git a/core/lib/Drupal/Core/Form/FormBuilder.php b/core/lib/Drupal/Core/Form/FormBuilder.php
index c92f2d6..1e5d83e 100644
--- a/core/lib/Drupal/Core/Form/FormBuilder.php
+++ b/core/lib/Drupal/Core/Form/FormBuilder.php
@@ -1061,7 +1061,7 @@ protected function handleInputElement($form_id, &$element, FormStateInterface &$
     // Set the element's value in $form_state['values'], but only, if its key
     // does not exist yet (a #value_callback may have already populated it).
     if (!NestedArray::keyExists($form_state->getValues(), $element['#parents'])) {
-      $this->setValue($element, $element['#value'], $form_state);
+      $form_state->setValueForElement($element, $element['#value']);
     }
   }
 
@@ -1126,15 +1126,6 @@ protected function buttonWasClicked($element, FormStateInterface &$form_state) {
   }
 
   /**
-   * {@inheritdoc}
-   */
-  public function setValue($element, $value, FormStateInterface &$form_state) {
-    $values = $form_state->getValues();
-    NestedArray::setValue($values, $element['#parents'], $value, TRUE);
-    $form_state->set('values', $values);
-  }
-
-  /**
    * Triggers kernel.response and sends a form response.
    *
    * @param \Symfony\Component\HttpFoundation\Response $response
diff --git a/core/lib/Drupal/Core/Form/FormBuilderInterface.php b/core/lib/Drupal/Core/Form/FormBuilderInterface.php
index bb4d953..70dd29e 100644
--- a/core/lib/Drupal/Core/Form/FormBuilderInterface.php
+++ b/core/lib/Drupal/Core/Form/FormBuilderInterface.php
@@ -324,33 +324,4 @@ public function prepareForm($form_id, &$form, FormStateInterface &$form_state);
    */
   public function doBuildForm($form_id, &$element, FormStateInterface &$form_state);
 
-  /**
-   * Changes submitted form values during form validation.
-   *
-   * Use this function to change the submitted value of a form element in a form
-   * validation function, so that the changed value persists in $form_state
-   * through to the submission handlers.
-   *
-   * Note that form validation functions are specified in the '#validate'
-   * component of the form array (the value of $form['#validate'] is an array of
-   * validation function names). If the form does not originate in your module,
-   * you can implement hook_form_FORM_ID_alter() to add a validation function
-   * to $form['#validate'].
-   *
-   * @param $element
-   *   The form element that should have its value updated; in most cases you
-   *   can just pass in the element from the $form array, although the only
-   *   component that is actually used is '#parents'. If constructing yourself,
-   *   set $element['#parents'] to be an array giving the path through the form
-   *   array's keys to the element whose value you want to update. For instance,
-   *   if you want to update the value of $form['elem1']['elem2'], which should
-   *   be stored in $form_state['values']['elem1']['elem2'], you would set
-   *   $element['#parents'] = array('elem1','elem2').
-   * @param $value
-   *   The new value for the form element.
-   * @param $form_state
-   *   The current state of the form where the value change should be recorded.
-   */
-  public function setValue($element, $value, FormStateInterface &$form_state);
-
 }
diff --git a/core/lib/Drupal/Core/Form/FormState.php b/core/lib/Drupal/Core/Form/FormState.php
index b0a21db..f717a23 100644
--- a/core/lib/Drupal/Core/Form/FormState.php
+++ b/core/lib/Drupal/Core/Form/FormState.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\Core\Form;
 
+use Drupal\Component\Utility\NestedArray;
 use Drupal\Core\Url;
 
 /**
@@ -566,7 +567,7 @@ public function addBuildInfo($property, $value) {
    * {@inheritdoc}
    */
   public function getValues() {
-    return $this->values;
+    return $this->values ?: array();
   }
 
   /**
@@ -582,6 +583,16 @@ public function addValue($property, $value) {
   /**
    * {@inheritdoc}
    */
+  public function setValueForElement($element, $value) {
+    $values = $this->getValues();
+    NestedArray::setValue($values, $element['#parents'], $value, TRUE);
+    $this->set('values', $values);
+    return $this;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
   public function setRedirect(Url $url) {
     $this->set('redirect_route', $url);
     return $this;
diff --git a/core/lib/Drupal/Core/Form/FormStateInterface.php b/core/lib/Drupal/Core/Form/FormStateInterface.php
index 24ceb52..78fd914 100644
--- a/core/lib/Drupal/Core/Form/FormStateInterface.php
+++ b/core/lib/Drupal/Core/Form/FormStateInterface.php
@@ -161,6 +161,35 @@ public function getValues();
   public function addValue($property, $value);
 
   /**
+   * Changes submitted form values during form validation.
+   *
+   * Use this function to change the submitted value of a form element in a form
+   * validation function, so that the changed value persists in $form_state
+   * through to the submission handlers.
+   *
+   * Note that form validation functions are specified in the '#validate'
+   * component of the form array (the value of $form['#validate'] is an array of
+   * validation function names). If the form does not originate in your module,
+   * you can implement hook_form_FORM_ID_alter() to add a validation function
+   * to $form['#validate'].
+   *
+   * @param array $element
+   *   The form element that should have its value updated; in most cases you
+   *   can just pass in the element from the $form array, although the only
+   *   component that is actually used is '#parents'. If constructing yourself,
+   *   set $element['#parents'] to be an array giving the path through the form
+   *   array's keys to the element whose value you want to update. For instance,
+   *   if you want to update the value of $form['elem1']['elem2'], which should
+   *   be stored in $form_state['values']['elem1']['elem2'], you would set
+   *   $element['#parents'] = array('elem1','elem2').
+   * @param mixed $value
+   *   The new value for the form element.
+   *
+   * @return $this
+   */
+  public function setValueForElement($element, $value);
+
+  /**
    * Determines if any forms have any errors.
    *
    * @return bool
diff --git a/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php b/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php
index d1489c8..a56f701 100644
--- a/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php
+++ b/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php
@@ -396,7 +396,7 @@ public static function validateDefaultImageForm(array &$element, FormStateInterf
     else {
       $value = 0;
     }
-    \Drupal::formBuilder()->setValue($element, $value, $form_state);
+    $form_state->setValueForElement($element, $value);
   }
 
   /**
diff --git a/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php b/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php
index 43ef3cb..c4098c1 100644
--- a/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php
+++ b/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php
@@ -145,7 +145,7 @@ public static function validateAllowedValues($element, FormStateInterface $form_
         }
       }
 
-      \Drupal::formBuilder()->setValue($element, $values, $form_state);
+      $form_state->setValueForElement($element, $values);
     }
   }
 
diff --git a/core/modules/path/src/Plugin/Field/FieldWidget/PathWidget.php b/core/modules/path/src/Plugin/Field/FieldWidget/PathWidget.php
index dc4d256..513aee4 100644
--- a/core/modules/path/src/Plugin/Field/FieldWidget/PathWidget.php
+++ b/core/modules/path/src/Plugin/Field/FieldWidget/PathWidget.php
@@ -87,13 +87,12 @@ public static function validateFormElement(array &$element, FormStateInterface $
     // Trim the submitted value.
     $alias = trim($element['alias']['#value']);
     if (!empty($alias)) {
-      $form_builder = \Drupal::formBuilder();
-      $form_builder->setValue($element['alias'], $alias, $form_state);
+      $form_state->setValueForElement($element['alias'], $alias);
 
       // Validate that the submitted alias does not exist yet.
       $is_exists = \Drupal::service('path.alias_storage')->aliasExists($alias, $element['langcode']['#value'], $element['source']['#value']);
       if ($is_exists) {
-        $form_builder->setError($element, $form_state, t('The alias is already in use.'));
+        $form_state->setError($element, t('The alias is already in use.'));
       }
     }
   }
diff --git a/core/tests/Drupal/Tests/Core/Form/FormStateTest.php b/core/tests/Drupal/Tests/Core/Form/FormStateTest.php
index 3c60ddf..8e1ca97 100644
--- a/core/tests/Drupal/Tests/Core/Form/FormStateTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/FormStateTest.php
@@ -159,4 +159,28 @@ public function testFormErrorsDuringSubmission() {
     $form_state->setErrorByName('test', 'message');
   }
 
+  /**
+   * Tests that setting the value for an element adds to the values.
+   *
+   * @covers ::setValueForElement
+   */
+  public function testSetValueForElement() {
+    $element = array(
+      '#parents' => array(
+        'foo',
+        'bar',
+      ),
+    );
+    $value = $this->randomName();
+
+    $form_state = new FormState();
+    $form_state->setValueForElement($element, $value);
+    $expected = array(
+      'foo' => array(
+        'bar' => $value,
+      ),
+    );
+    $this->assertSame($expected, $form_state->getValues());
+  }
+
 }
