Skip to content

Commit

Permalink
Add empty validateForm todo and update error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
kepol committed Jul 27, 2023
1 parent 566a79b commit 71c0176
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion modules/quant_purger/src/Form/ConfigurationForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,19 @@ public function submitFormClear(array &$form, FormStateInterface $form_state) {
}
else {
$status = 'error';
$message = $this->t('Unable to clear the traffic registry due to form errors.');
$message = $this->t('Unable to clear the traffic registry due to form errors:<br/><br/>' . implode('<br/>', $form_state->getErrors()));
}

$response->addCommand(new PrependCommand('#purgedialogform', '<div class="messages messages--' . $status . '" style="margin-top: 1rem"><div class="message__content">' . $message . '</div></div>'));

return $response;
}

/**
* {@inheritdoc}
*/
public function validateForm(array &$form, FormStateInterface $form_state) {
// @todo Add validation for path_blocklist and tag_blocklist.
}

}

0 comments on commit 71c0176

Please sign in to comment.