You are here

function user_badges_settings_form_validate in User Badges 7.3

Same name and namespace in other branches
  1. 6.2 user_badges.admin.inc \user_badges_settings_form_validate()
  2. 6 user_badges.admin.inc \user_badges_settings_form_validate()
  3. 7.4 includes/user_badges.admin.inc \user_badges_settings_form_validate()
  4. 7 user_badges.admin.inc \user_badges_settings_form_validate()
  5. 7.2 user_badges.admin.inc \user_badges_settings_form_validate()

Validate user_badges_settings_form input.

File

./user_badges.admin.inc, line 945
@brief User Badges admin functions

Code

function user_badges_settings_form_validate($form, $form_state) {

  // 'showone' must be numeric.
  if (!is_numeric($form_state['values']['showone']) || $form_state['values']['showone'] < 0) {
    form_set_error('showone', t('Must be a positive number.'));
  }
}