function ad_text_global_settings_validate in Advertisement 6
Same name and namespace in other branches
- 5.2 text/ad_text.module \ad_text_global_settings_validate()
- 5 text/ad_text.module \ad_text_global_settings_validate()
- 6.3 text/ad_text.module \ad_text_global_settings_validate()
- 6.2 text/ad_text.module \ad_text_global_settings_validate()
- 7 text/ad_text.module \ad_text_global_settings_validate()
Settings form validation handler.
File
- text/
ad_text.module, line 167 - Enhances the ad module to support static text ads.
Code
function ad_text_global_settings_validate($form, &$form_state) {
if ((int) $form_state['values']['header_min'] > (int) $form_state['values']['header_max']) {
form_set_error('header_min', t('The header minimum length can not be greater than the header maximum length.'));
}
if ((int) $form_state['values']['body_min'] > (int) $form_state['values']['body_max']) {
form_set_error('body_min', t('The body minimum length can not be greater than the body maximum length.'));
}
}