You are here

protected function WebformVariantFormBase::processVariantFormErrors in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Form/WebformVariantFormBase.php \Drupal\webform\Form\WebformVariantFormBase::processVariantFormErrors()

Process variant webform errors in webform.

Parameters

\Drupal\Core\Form\FormStateInterface $variant_state: The webform variant webform state.

\Drupal\Core\Form\FormStateInterface &$form_state: The webform state.

1 call to WebformVariantFormBase::processVariantFormErrors()
WebformVariantFormBase::validateForm in src/Form/WebformVariantFormBase.php
Form validation handler.

File

src/Form/WebformVariantFormBase.php, line 349

Class

WebformVariantFormBase
Provides a base webform for webform variants.

Namespace

Drupal\webform\Form

Code

protected function processVariantFormErrors(FormStateInterface $variant_state, FormStateInterface &$form_state) {
  foreach ($variant_state
    ->getErrors() as $name => $message) {
    $form_state
      ->setErrorByName($name, $message);
  }
}