public function QueueMailSettingsForm::validateForm in Queue Mail 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/ QueueMailSettingsForm.php, line 174
Class
- QueueMailSettingsForm
- Configures module's settings.
Namespace
Drupal\queue_mail\FormCode
public function validateForm(array &$form, FormStateInterface $form_state) {
$queue_mail_queue_time = $form_state
->getValue('queue_mail_queue_time');
$queue_mail_queue_wait_time = $form_state
->getValue('queue_mail_queue_wait_time');
if ($queue_mail_queue_time < $queue_mail_queue_wait_time) {
$form_state
->setErrorByName('queue_mail_queue_wait_time', $this
->t('"Wait time per item" value can not be bigger than "Queue processing time" value.'));
}
}