You are here

public function FlagFormBase::validateForm in Flag 8.4

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/FlagFormBase.php, line 301

Class

FlagFormBase
Provides the base flag add/edit form.

Namespace

Drupal\flag\Form

Code

public function validateForm(array &$form, FormStateInterface $form_state) {
  parent::validateForm($form, $form_state);
  $flag = $this->entity;
  $flag
    ->getFlagTypePlugin()
    ->validateConfigurationForm($form, $form_state);
  $flag
    ->getLinkTypePlugin()
    ->validateConfigurationForm($form, $form_state);
}