You are here

function uc_cart_cart_settings_form_validate in Ubercart 6.2

Same name and namespace in other branches
  1. 5 uc_cart/uc_cart.module \uc_cart_cart_settings_form_validate()
  2. 7.3 uc_cart/uc_cart.admin.inc \uc_cart_cart_settings_form_validate()

See also

uc_cart_cart_settings_form()

File

uc_cart/uc_cart.admin.inc, line 218
Cart administration menu items.

Code

function uc_cart_cart_settings_form_validate($form, &$form_state) {
  if (!is_numeric($form_state['values']['uc_minimum_subtotal']) || $form_state['values']['uc_minimum_subtotal'] < 0 || $form_state['values']['uc_minimum_subtotal'] === '-0') {
    form_set_error('uc_minimum_subtotal', t('Minimum order subtotal should be a non-negative number.'));
  }
}