function disclaimer_admin_settings_validate in Disclaimer 6.2
Same name and namespace in other branches
- 6 disclaimer.admin.inc \disclaimer_admin_settings_validate()
- 7 disclaimer.admin.inc \disclaimer_admin_settings_validate()
Validation function for the general configuration form.
Ensure that numeric value are numeric... and set input format
File
- ./
disclaimer.admin.inc, line 311 - Admin page callbacks for the disclaimer module.
Code
function disclaimer_admin_settings_validate($form, &$form_state) {
$age_limit = $form_state['values']['disclaimer_age_limit'];
if (!empty($age_limit) && (!is_numeric($age_limit) || $age_limit < 0)) {
form_set_error('disclaimer_age_limit', t('You must enter an age greater than 0.'));
}
}