public function ConfigurationForm::validateForm in URLs queuer 8
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/ ConfigurationForm.php, line 220
Class
- ConfigurationForm
- Configuration form for the Url and Path queuer.
Namespace
Drupal\purge_queuer_url\FormCode
public function validateForm(array &$form, FormStateInterface $form_state) {
// Remove empty values from the blacklist so this doesn't cause issues.
$blacklist = [];
foreach ($form_state
->getValue('blacklist') as $string) {
if (!empty(trim($string))) {
$blacklist[] = $string;
}
}
$form_state
->setValue('blacklist', $blacklist);
}