You are here

public static function WebformEmailMultiple::processWebformEmailConfirm in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Element/WebformEmailMultiple.php \Drupal\webform\Element\WebformEmailMultiple::processWebformEmailConfirm()

Process email multiple element.

File

src/Element/WebformEmailMultiple.php, line 44

Class

WebformEmailMultiple
Provides a webform element for entering multiple comma delimited email addresses.

Namespace

Drupal\webform\Element

Code

public static function processWebformEmailConfirm(&$element, FormStateInterface $form_state, &$complete_form) {

  // Add validate callback.
  $element += [
    '#element_validate' => [],
  ];
  array_unshift($element['#element_validate'], [
    get_called_class(),
    'validateWebformEmailMultiple',
  ]);
  return $element;
}