public static function validateElement(array $element, FormStateInterface $form_state) {
    if ($element['#required'] && $element['#value'] == '_none') {
      $form_state->setError($element, t('@name field is required.', ['@name' => $element['#title']]));
    }

    // Save the value in the element key_column.
    // Note: there is only one item because the field is not multiple value.
    $items = [$element['#key_column'] => $element['#value']];

    $form_state->setValueForElement($element, $items);
  }