You are here

public function BlocktabsEditForm::tabValidate in Block Tabs 8

Validate handler for tab.

File

src/Form/BlocktabsEditForm.php, line 186

Class

BlocktabsEditForm
Controller for blocktabs edit form.

Namespace

Drupal\blocktabs\Form

Code

public function tabValidate($form, FormStateInterface $form_state) {
  if (!$form_state
    ->getValue('new')) {
    $form_state
      ->setErrorByName('new', $this
      ->t('Select an tab to add.'));
  }
}