You are here

public function LockrCSRForm::validateForm in Lockr 8.2

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 FormInterface::validateForm

File

src/Form/LockrCSRForm.php, line 112

Class

LockrCSRForm

Namespace

Drupal\lockr\Form

Code

public function validateForm(array &$form, FormStateInterface $form_state) {
  $private_path = PrivateStream::basePath();
  if (!is_dir($private_path)) {
    $form_state
      ->setErrorByName('', 'File private path is not a directory, ' . 'please update the private file system path in settings.php. ' . 'Preferrably to a location outside the webroot.');
  }
}