You are here

protected function YamlFormHandlerFormBase::processHandlerFormErrors in YAML Form 8

Process handler form errors in form.

Parameters

FormStateInterface $handler_state: The form handler form state.

FormStateInterface &$form_state: The form state.

1 call to YamlFormHandlerFormBase::processHandlerFormErrors()
YamlFormHandlerFormBase::validateForm in src/Form/YamlFormHandlerFormBase.php
Form validation handler.

File

src/Form/YamlFormHandlerFormBase.php, line 245

Class

YamlFormHandlerFormBase
Provides a base form for form handlers.

Namespace

Drupal\yamlform\Form

Code

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