You are here

public function UltimateCronSerialLauncher::settingsFormValidate in Ultimate Cron 7.2

Settings form validator.

Overrides UltimateCronPlugin::settingsFormValidate

File

plugins/ultimate_cron/launcher/serial.class.php, line 120
Serial cron job launcher for Ultimate Cron.

Class

UltimateCronSerialLauncher
Ultimate Cron launcher plugin class.

Code

public function settingsFormValidate(&$form, &$form_state, $job = NULL) {
  $elements =& $form['settings'][$this->type][$this->name];
  $values =& $form_state['values']['settings'][$this->type][$this->name];
  if (!$job) {
    if (intval($values['max_threads']) <= 0) {
      form_set_error("settings[{$this->type}][{$this->name}", t('%title must be greater than 0', array(
        '%title' => $elements['launcher']['max_threads']['#title'],
      )));
    }
  }
}