function uc_cart_cart_settings_form_validate in Ubercart 7.3
Same name and namespace in other branches
- 5 uc_cart/uc_cart.module \uc_cart_cart_settings_form_validate()
- 6.2 uc_cart/uc_cart.admin.inc \uc_cart_cart_settings_form_validate()
Form validation for uc_cart_cart_settings_form().
See also
File
- uc_cart/
uc_cart.admin.inc, line 209 - 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.'));
}
}