function uc_addresses_validate_address_field_country in Ubercart Addresses 7
Element validation callback for country field.
Store the current address for use when rebuilding the form.
1 string reference to 'uc_addresses_validate_address_field_country'
- UcAddressesUcCountryFieldHandler::getFormField in handlers/
ubercart.handlers.inc - Implements UcAddressesFieldHandler::getFormField().
File
- ./
uc_addresses.module, line 958 - Adds user profile address support to Ubercart.
Code
function uc_addresses_validate_address_field_country($element, &$form_state) {
$address = drupal_array_get_nested_value($form_state['values'], array_slice($element['#parents'], 0, -1));
$form_state['uc_addresses_address'] = isset($form_state['uc_addresses_address']) ? array_merge($form_state['uc_addresses_address'], $address) : $address;
}