function shoutbox_admin_settings_validate in Shoutbox 6.2
Same name and namespace in other branches
- 7.2 shoutbox.pages.inc \shoutbox_admin_settings_validate()
- 7 shoutbox.pages.inc \shoutbox_admin_settings_validate()
Validate the admin settings form
File
- ./
shoutbox.pages.inc, line 157 - Page callbacks for the shoutbox module.
Code
function shoutbox_admin_settings_validate($form, &$form_state) {
if (!is_numeric($form_state['values']['shoutbox_showamount_block'])) {
form_set_error('shoutbox_showamount_block', t('Block amount must be numeric'));
}
if (!is_numeric($form_state['values']['shoutbox_showamount_page'])) {
form_set_error('shoutbox_showamount_page', t('Page amount must be numeric'));
}
if (!is_numeric($form_state['values']['shoutbox_max_length'])) {
form_set_error('shoutbox_max_length', t('Shoutbox length must be numeric'));
}
if (!is_numeric($form_state['values']['shoutbox_refresh'])) {
form_set_error('shoutbox_refresh', t('Refresh setting must be a numeric value'));
}
if (!is_numeric($form_state['values']['shoutbox_anonymous_timeout'])) {
form_set_error('shoutbox_anonymous_timeout', t('Anonymous timeout setting must be a numeric value'));
}
if (!is_numeric($form_state['values']['shoutbox_registered_timeout'])) {
form_set_error('shoutbox_registered_timeout', t('Registered timeout setting must be a numeric value'));
}
if (!is_numeric($form_state['values']['shoutbox_expire'])) {
form_set_error('shoutbox_expire', t('Expiration setting must be a numeric value'));
}
}