You are here

public function EntityEmbedDialog::validateForm in Entity Embed 8

Form validation handler.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides FormBase::validateForm

File

src/Form/EntityEmbedDialog.php, line 564

Class

EntityEmbedDialog
Provides a form to embed entities by specifying data attributes.

Namespace

Drupal\entity_embed\Form

Code

public function validateForm(array &$form, FormStateInterface $form_state) {
  parent::validateForm($form, $form_state);
  if ($form_state
    ->get('step') == 'select') {
    $this
      ->validateSelectStep($form, $form_state);
  }
  elseif ($form_state
    ->get('step') == 'embed') {
    $this
      ->validateEmbedStep($form, $form_state);
  }
}