You are here

public static function PluginSelector::validateFormElement in Plugin 8.2

Implements an #element_validate callback.

File

src/Plugin/Field/FieldWidget/PluginSelector.php, line 63

Class

PluginSelector
Provides a plugin selector field widget.

Namespace

Drupal\plugin\Plugin\Field\FieldWidget

Code

public static function validateFormElement(array &$element, FormStateInterface $form_state, array &$form) {
  $plugin_selector = static::getPluginSelector($form_state, $element);
  $plugin_selector
    ->validateSelectorForm($element['plugin_selector'], $form_state);
}