public function DeleteForm::validateForm in Filebrowser 3.x
Same name and namespace in other branches
- 8.2 src/Form/DeleteForm.php \Drupal\filebrowser\Form\DeleteForm::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/ DeleteForm.php, line 210
Class
Namespace
Drupal\filebrowser\FormCode
public function validateForm(array &$form, FormStateInterface $form_state) {
// Check if the confirmation checkbox has been checked.
if (empty($form_state
->getValue('confirmation'))) {
// commented out original code below
// https://www.drupal.org/project/filebrowser/issues/2955654
// $this->common->debugToConsole('validate');
// $form_state->setErrorByName('confirmation', $this->t('You must confirm deletion of selected folders.'));
$this->error = true;
}
// Check if the confirmation checkbox has been checked.
parent::validateForm($form, $form_state);
}