function hosting_queues_configure_validate in Hosting 7.4
Same name and namespace in other branches
- 6.2 hosting.module \hosting_queues_configure_validate()
- 7.3 hosting.module \hosting_queues_configure_validate()
Validation callback for the the queue execution frequency form.
See also
File
- ./
hosting.module, line 1071 - Hosting module.
Code
function hosting_queues_configure_validate($form, &$form_state) {
foreach (hosting_get_queues() as $queue => $info) {
if ($form_state['values'][$queue]) {
if ($form_state['values'][$queue]['frequency']['ticks'] && !is_numeric($form_state['values'][$queue]['frequency']['ticks'])) {
form_set_error($queue, t('Please enter a valid frequency.'));
}
if (isset($form_state['values'][$queue]['frequency']['items']) && !is_numeric($form_state['values'][$queue]['frequency']['items'])) {
form_set_error($queue, t('Please enter a valid amount of items.'));
}
}
}
}