You are here

public function ConfigSplitEntityForm::validateForm in Configuration Split 2.0.x

Same name and namespace in other branches
  1. 8 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 278

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.'));
  }
}