function quicktabs_form_validate in Quick Tabs 5
Same name and namespace in other branches
- 6.3 includes/admin.inc \quicktabs_form_validate()
- 6 quicktabs.module \quicktabs_form_validate()
- 6.2 includes/admin.inc \quicktabs_form_validate()
- 7.3 quicktabs.admin.inc \quicktabs_form_validate()
- 7.2 includes/admin.inc \quicktabs_form_validate()
File
- ./
quicktabs.module, line 395
Code
function quicktabs_form_validate($form_id, $form_values) {
if ($form_values['op'] == t('Submit')) {
if (empty($form_values['title'])) {
form_set_error('title', t('You must give your Quick Tabs block a title.'));
}
else {
foreach ($form_values['tabs'] as $i => $tab) {
if (empty($tab['tabtext'])) {
form_set_error($form_values['tabs'][$i]['tabtext'], t('You must give each tab a title.'));
}
if ($tab['tabtype'] == 'view' && empty($tab['limit'])) {
form_set_error($form_values['tabs'][$i]['limit'], t('You must enter a limit for each view.'));
}
}
}
}
else {
return;
}
}