function login_shadowbox_settings_validate in Shadowbox 7.4
Validate shadowbox login settings form inputs.
File
- login_shadowbox/
login_shadowbox.admin.inc, line 115
Code
function login_shadowbox_settings_validate($form, &$form_state) {
$width = $form_state['values']['login_shadowbox_width'];
$height = $form_state['values']['login_shadowbox_height'];
if (!is_numeric($width) || $width < 0) {
form_set_error('login_shadowbox_width', t('You must enter a positive number.'));
}
if (!is_numeric($height) || $height < 0) {
form_set_error('login_shadowbox_height', t('You must enter a positive number.'));
}
}