Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Identity Number Bundle

Identity Number Bundle Laravel Package

jongotlin/identity-number-bundle

Symfony bundle that integrates jongotlin/identity-number into your app, adding validator constraints and service wiring to check national identity numbers across supported countries, including format and checksum validation for forms and domain models.

View on GitHub
Deep Wiki
Context7

Symfony bundle to validate Swedish identity-, coordination- and organizationnumbers

Frequently asked questions about Identity Number Bundle
Can I use jongotlin/identity-number-bundle in a Laravel application?
No. jongotlin/identity-number-bundle is a Symfony bundle that registers a DI service and a Symfony Validator constraint; it has no Laravel service provider, facade, or Illuminate validation rule. In Laravel, use the underlying jongotlin/identity-number library instead and wrap it in a custom ValidationRule.
Which countries and identity number types does this package support?
The package overview describes Norwegian fødselsnummer, D-nummer, and H-nummer support with checksum validation and date-of-birth and gender extraction. Some surrounding documentation is inconsistent and mentions South African or Swedish identity numbers, so confirm the country coverage against the actual library version you install. Treat the README and source as authoritative before building onboarding flows around it.
How do I install jongotlin/identity-number-bundle?
On Symfony you install it with composer require jongotlin/identity-number-bundle and register the bundle in config/bundles.php. There is no equivalent Laravel installation path because the bundle expects Symfony's kernel, container, and validator wiring. For Laravel, install jongotlin/identity-number and write your own rule.
How do I validate a Norwegian fødselsnummer in Laravel?
Run composer require jongotlin/identity-number, then create a custom rule class that calls the library and returns a failure with your own message key. Add PHPUnit cases for valid fødselsnummer, D-nummer, H-nummer, checksum failures, malformed strings, and impossible dates. Keep the library call isolated behind the rule so you can swap implementations later.
Does the package validate checksums and extract date of birth and gender?
Yes, as described, it validates checksums and extracts date of birth and gender across fødselsnummer, D-nummer, and H-nummer formats. That is structural validation only: it does not prove the number is assigned to a real person. Do not treat a passing check as identity verification.
What PHP and Symfony versions does jongotlin/identity-number-bundle require?
The overview does not pin PHP or Symfony versions, so read the package's composer.json before committing to it. Because the project has zero stars and a single maintainer, its constraints may not resolve against a current Laravel or Symfony release. Run composer why-not against your target versions early.
Is jongotlin/identity-number-bundle actively maintained?
The available assessment rates it as effectively unmaintained: zero stars, zero dependents, a single maintainer, and a score of zero. Assume there will be no timely fixes and plan to fork, vendor, or rely on the plain PHP library. Check the last 12 months of releases before adoption.
What is the difference between the bundle and the jongotlin/identity-number library?
The bundle is the Symfony integration layer: DI service registration, a validator constraint, and bundle configuration. The jongotlin/identity-number library is plain PHP and contains the actual validation logic, making it the reusable part for Laravel. Use the bundle as a usage example, not as a Laravel dependency.
How should I test identity number validation in Laravel?
Build fixtures of known valid and invalid numbers for each supported format, including D-nummer and H-nummer edge cases, plus malformed input and checksum failures. Assert that bad input produces a validation error rather than an uncaught exception, and confirm whether the library returns false or throws. Include regression cases for date-of-birth and gender extraction if you rely on them.
Does this validation confirm the person actually exists?
No. Checksum and format rules prove only that a number is structurally plausible, not that it exists or belongs to the person presenting it. If a product requirement means confirming a real customer, that needs a separate identity verification provider and a product decision.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource