You are here

function commerce_order_mail_validate in Commerce Core 7

Element validate handler: strip whitespaces from order related e-mail fields.

See also

commerce_order_account_pane_checkout_form()

1 string reference to 'commerce_order_mail_validate'
commerce_order_account_pane_checkout_form in modules/order/includes/commerce_order.checkout_pane.inc
Account pane: form callback.

File

modules/order/commerce_order.module, line 1517
Defines the core Commerce order entity and API functions to manage orders and interact with them.

Code

function commerce_order_mail_validate($element, &$form_state, $form) {
  form_set_value($element, trim($element['#value']), $form_state);
}