Closed stwonary closed 3 years ago
Some countries have multiple mobile formats. Austria and Bulgaria for example.
+43 6604 856532 +43 6604 85653
If I override the phone format, the one with fewer digits is detected as an invalid format. Any idea how can I support both formats?
await FlutterLibphonenumber().init(overrides: { 'AT': CountryWithPhoneCode( phoneCode: '43', countryCode: 'AT', exampleNumberMobileNational: '06643 123456', exampleNumberFixedLineNational: '01 234567890', phoneMaskMobileNational: '00000 000000', phoneMaskFixedLineNational: '00 000000000', exampleNumberMobileInternational: '+43 6643 123456', exampleNumberFixedLineInternational: '+359 2 123 4567', phoneMaskMobileInternational: '+00 0000 000000', phoneMaskFixedLineInternational: '+00 0 000000000', countryName: 'Austria', ) });
Ah yes, this is not yet implemented, but PRs are welcome!
This should now be possible with the latest version and using the additionalDigits parameter to the formatter.
additionalDigits
Some countries have multiple mobile formats. Austria and Bulgaria for example.
+43 6604 856532 +43 6604 85653
If I override the phone format, the one with fewer digits is detected as an invalid format. Any idea how can I support both formats?