function uc_order_add_line_item_form_validate in Ubercart 5
Same name and namespace in other branches
- 6.2 uc_order/uc_order.admin.inc \uc_order_add_line_item_form_validate()
- 7.3 uc_order/uc_order.admin.inc \uc_order_add_line_item_form_validate()
File
- uc_order/
uc_order.module, line 2419
Code
function uc_order_add_line_item_form_validate($form_id, $form_values) {
$func = _line_item_data($form_values['line_item_id'], 'callback');
if (function_exists($func) && ($form = $func('form', $form_values['order_id'])) != NULL) {
$func('validate', $form_values['order_id']);
}
else {
if (!is_numeric($form_values['amount'])) {
form_set_error('amount', t('Amount must be numeric.'));
}
}
}