function globallink_adaptor_settings_validate in GlobalLink Connect for Drupal 7.6
Same name and namespace in other branches
- 7.7 globallink_settings.inc \globallink_adaptor_settings_validate()
- 7.5 globallink_settings.inc \globallink_adaptor_settings_validate()
Validates adaptor settings.
File
- ./
globallink_settings.inc, line 379
Code
function globallink_adaptor_settings_validate($form, &$form_state) {
$op = isset($form_state['values']['op']) ? $form_state['values']['op'] : '';
if ($op == t('Save Adaptor Settings')) {
$value = $form_state['values']['globallink_pager_limit'];
if (!is_numeric($value)) {
form_set_error('globallink_pager_limit', t('Dahsboard Pager Limit is not a number.'));
}
elseif ($value < 1) {
form_set_error('globallink_pager_limit', t('Dahsboard Pager Limit should be greater than 1.'));
}
}
}