You are here

public static function ConfigForm::validate_css_classes in Insert 8

Parameters

array $element:

FormStateInterface $form_state:

array $form:

File

src/Form/ConfigForm.php, line 102

Class

ConfigForm

Namespace

Drupal\insert\Form

Code

public static function validate_css_classes($element, &$form_state) {

  // Sanitize white-space.
  $segments = preg_split('/\\s+/', trim($element['#value']));
  $form_state
    ->setValueForElement($element, join(' ', $segments));
}