You are here

public function SolrUploadConfigsetForm::validateForm in Search API Solr 4.x

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

modules/search_api_solr_admin/src/Form/SolrUploadConfigsetForm.php, line 77

Class

SolrUploadConfigsetForm
The upload configset form.

Namespace

Drupal\search_api_solr_admin\Form

Code

public function validateForm(array &$form, FormStateInterface $form_state) {
  if (!$form_state
    ->getValue('accept')) {
    $form_state
      ->setError($form['accept'], $this
      ->t('You must accept the action that will be taken after the configset is uploaded.'));
  }
}