You are here

public function MigrateForm::validateForm in Workbench Moderation to Content Moderation 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/MigrateForm.php, line 109

Class

MigrateForm
A form to trigger batch processing if state is valid.

Namespace

Drupal\wbm2cm\Form

Code

public function validateForm(array &$form, FormStateInterface $form_state) {
  $messages = $this->migrate
    ->getValidationMessages();
  foreach ($messages as $message_id => $message) {
    $form_state
      ->setErrorByName($message_id, $message);
  }
}