You are here

function uc_usps_admin_settings_validate in Ubercart 7.3

Same name and namespace in other branches
  1. 6.2 shipping/uc_usps/uc_usps.admin.inc \uc_usps_admin_settings_validate()

Validation handler for uc_usps_admin_settings form.

See also

uc_usps_admin_settings()

uc_usps_admin_settings_submit()

File

shipping/uc_usps/uc_usps.admin.inc, line 224
USPS administration menu items.

Code

function uc_usps_admin_settings_validate($form, &$form_state) {
  if (!is_numeric($form_state['values']['uc_usps_rate_markup'])) {
    form_set_error('uc_usps_rate_markup', t('Rate markup must be a numeric value.'));
  }
  if (!is_numeric($form_state['values']['uc_usps_weight_markup'])) {
    form_set_error('uc_usps_weight_markup', t('Weight markup must be a numeric value.'));
  }
}