You are here

protected function FeedTypeForm::moveFormStateErrors in Feeds 8.3

Moves form state errors from one form state to another.

1 call to FeedTypeForm::moveFormStateErrors()
FeedTypeForm::validateForm in src/FeedTypeForm.php
Form validation handler.

File

src/FeedTypeForm.php, line 421

Class

FeedTypeForm
Form controller for the feed type edit forms.

Namespace

Drupal\feeds

Code

protected function moveFormStateErrors(FormStateInterface $from, FormStateInterface $to) {
  foreach ($from
    ->getErrors() as $name => $error) {
    $to
      ->setErrorByName($name, $error);
  }
}