function customer_profile_type_ui_pane_checkout_form_validate in Customer Profile Type UI 7
Checkout pane callback: validates a customer profile edit form.
File
- includes/
customer_profile_type_ui.checkout_pane.inc, line 41 - Checkout pane callback functions for the customer_profiles_type_ui module.
Code
function customer_profile_type_ui_pane_checkout_form_validate($form, &$form_state, $checkout_pane, &$order) {
// If this customer profile pane is disabled, then we want to return true so that verification
// of this pane doesn't get in the way of proceeding through checkout.
if (_customer_profile_type_ui_disable_this_pane($checkout_pane['pane_id'], $order)) {
return TRUE;
}
// Not disabled so get original callback and call it.
$original_panes = _customer_profile_type_ui_store_checkout_pane_contexts();
if ($callback = commerce_checkout_pane_callback($original_panes[$checkout_pane['pane_id']], 'checkout_form_validate')) {
// Validate the form using the original pane callback.
return $callback($form, $form_state, $checkout_pane, $order);
}
}