You are here

public function ConfigSplitEntityForm::validateForm in Configuration Split 8

Same name and namespace in other branches
  1. 2.0.x src/Form/ConfigSplitEntityForm.php \Drupal\config_split\Form\ConfigSplitEntityForm::validateForm()

Form validation handler.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides FormBase::validateForm

File

src/Form/ConfigSplitEntityForm.php, line 230

Class

ConfigSplitEntityForm
The entity form.

Namespace

Drupal\config_split\Form

Code

public function validateForm(array &$form, FormStateInterface $form_state) {
  parent::validateForm($form, $form_state);
  $folder = $form_state
    ->getValue('folder');
  if (static::isConflicting($folder)) {
    $form_state
      ->setErrorByName('folder', $this
      ->t('The split folder can not be in the sync folder.'));
  }
}