Default country code

Created on 10 December 2012, about 12 years ago
Updated 10 January 2025, 9 days ago

It would be great to have such option, because most of my customers enter VAT number in local manner (without country code). So i have made this modification in vat_number_field_widget_element_validate:

    //at first check the format of VAT, if its ok ...
    $vat_format_check = _vat_number_check_vat_format($value);
    if(isset($vat_format_check['message'])) {
      $value = 'PL'.$value;                                     // default country code here : added
      $vat_format_check = _vat_number_check_vat_format($value); // added
      if(isset($vat_format_check['message'])) {                 // added 
        $message = $vat_format_check['message'];
      }                                                         // added
    }

The better solution is special setting on settings form.

Feature request
Status

Closed: won't fix

Component

Code

Created by

🇵🇱Poland geemark

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024