Skip to content

Conversation

@arnested
Copy link

@arnested arnested commented Nov 4, 2025

The regex is constructed based on the Norwegian Police's control
guide: https://www.politiet.no/globalassets/tjenester-admin/pass-og-id-kort/control-guide-for-norwegian-passports.pdf (ISBN 978-82-8256-097-9).

It matches Norwegian passport numbers starting with C, K, or FG, FH, FJ, FL, and FK prefixes, followed by alphanumeric characters.

The guide is not very detailed. It does not specify passport number length, so this is not validated.

Checklist

  • PR contains only changes related; no stray files, etc.
  • README updated (where applicable)
  • Tests written (where applicable)
  • References provided in PR (where applicable)

control-guide-for-norwegian-passports.pdf

@codecov
Copy link

codecov bot commented Nov 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (f2e3633) to head (0b532a5).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #2623   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          114       114           
  Lines         2566      2566           
  Branches       651       651           
=========================================
  Hits          2566      2566           

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

The regex is constructed based on the Norwegian Police's control
guide:
https://www.politiet.no/globalassets/tjenester-admin/pass-og-id-kort/control-guide-for-norwegian-passports.pdf
(ISBN 978-82-8256-097-9).

It matches Norwegian passport numbers starting with C, K, or FG, FH,
FJ, FL, and FK prefixes, followed by alphanumeric characters.

The guide is not very detailed. It does not specify passport number
length, so this is not validated.
@arnested arnested changed the title Add Norwegian passport validation feat(isPassportNumber): Add Norwegian passport validation Nov 4, 2025
@arnested arnested changed the title feat(isPassportNumber): Add Norwegian passport validation feat(isPassportNumber): add Norwegian passport validation Nov 4, 2025
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.

1 participant