public function FancyFileDeleteManual::validateForm in Fancy File Delete 2.0.x
Same name and namespace in other branches
- 8 src/Form/FancyFileDeleteManual.php \Drupal\fancy_file_delete\Form\FancyFileDeleteManual::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/ FancyFileDeleteManual.php, line 57
Class
- FancyFileDeleteManual
- Class FancyFileDeleteManual.
Namespace
Drupal\fancy_file_delete\FormCode
public function validateForm(array &$form, FormStateInterface $form_state) {
// Required doesn't work well with states it seemz.
if (!$form_state
->getValue([
'delete_textarea',
])) {
$form_state
->setErrorByName('delete_textarea', $this
->t('You can not leave this blank, what are you thinking?'));
}
}