function hosting_queues_configure_validate in Hosting 6.2
Same name and namespace in other branches
- 7.4 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 738 - 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 ($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.'));
}
}
}
}