Content Type Custom Submit Handler
When you create an entity node a value type for the content type is required. If your form doesn't provide one, you can add it to the values before creating the node:

  $values = $form_state-&gt;getValues();
  $values[] = ['type' =&gt; 'article'];
  $node = \Drupal\node\Entity\Node::create($values);