You are here

public function Standalone::validateConfigurationForm in Entity Browser 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/EntityBrowser/Display/Standalone.php \Drupal\entity_browser\Plugin\EntityBrowser\Display\Standalone::validateConfigurationForm()

Implements PluginFormInterface::validateConfigurationForm().

Overrides PluginConfigurationFormTrait::validateConfigurationForm

File

src/Plugin/EntityBrowser/Display/Standalone.php, line 70

Class

Standalone
Presents entity browser as a standalone form.

Namespace

Drupal\entity_browser\Plugin\EntityBrowser\Display

Code

public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {
  $path = $form_state
    ->getValue('path');
  if ($path[0] != '/') {
    $form_state
      ->setError($form['path'], $this
      ->t('The Path field must begin with a forward slash.'));
  }
}