Skip to content

Allow Swedish postcodes above 984 99 - #24

Merged
BenMorel merged 1 commit into
brick:mainfrom
cx18121:fix-swedish-postcodes
Jul 29, 2026
Merged

Allow Swedish postcodes above 984 99#24
BenMorel merged 1 commit into
brick:mainfrom
cx18121:fix-swedish-postcodes

Conversation

@cx18121

@cx18121 cx18121 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Swedish postcodes above 984 99 are currently rejected, even though they are in active use. For example, Kiruna municipality publishes addresses using both 985 31 Vittangi and 986 31 Karesuando:

https://kiruna.se/utbildning--barnomsorg/grundskola/grundskolor/vittangi-skola.html

This removes the stale upper allocation bound and validates the stable postcode structure instead: five digits beginning with a non-zero digit.

The existing NNN NN formatting remains unchanged. Regression cases for 98531 and 98631 have been added to the existing Swedish formatter data provider.

@cx18121 cx18121 closed this Jul 29, 2026
@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.21%. Comparing base (a63ebc3) to head (a1d369c).

Additional details and impacted files
@@             Coverage Diff              @@
##               main      #24      +/-   ##
============================================
- Coverage     99.21%   99.21%   -0.01%     
+ Complexity      504      502       -2     
============================================
  Files           186      186              
  Lines          1021     1019       -2     
============================================
- Hits           1013     1011       -2     
  Misses            8        8              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cx18121 cx18121 changed the title Fix validation of northern Swedish postcodes Allow Swedish postcodes above 984 99 Jul 29, 2026
@cx18121 cx18121 reopened this Jul 29, 2026
@BenMorel
BenMorel merged commit bd00669 into brick:main Jul 29, 2026
16 checks passed
@BenMorel

Copy link
Copy Markdown
Member

Thank you, @cx18121!

@BenMorel

Copy link
Copy Markdown
Member

Released in 0.6.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants