function throttle_admin_settings_validate in Drupal 5
Same name and namespace in other branches
- 6 modules/throttle/throttle.admin.inc \throttle_admin_settings_validate()
File
- modules/
throttle/ throttle.module, line 165 - Allows configuration of congestion control auto-throttle mechanism.
Code
function throttle_admin_settings_validate($form_id, $form_values) {
if (!is_numeric($form_values['throttle_anonymous']) || $form_values['throttle_anonymous'] < 0) {
form_set_error('throttle_anonymous', t("%value is not a valid auto-throttle setting. Please enter a positive numeric value.", array(
'%value' => $form_values['throttle_anonymous'],
)));
}
if (!is_numeric($form_values['throttle_user']) || $form_values['throttle_user'] < 0) {
form_set_error('throttle_user', t("%value is not a valid auto-throttle setting. Please enter a positive numeric value.", array(
'%value' => $form_values['throttle_user'],
)));
}
}