a simple validator for validation a norwegian social security numbers (FNR, DNR)
See Fødselsnummer for more info on how validation of a norwegian social security number is done
- Kotlin
- Gradle
- JDK 21
Gradle(kotlin)
implementation("io.github.mikaojk:norwegian-social-security-number-validator:2.0.9")
Maven
<dependency>
<groupId>io.github.mikaojk</groupId>
<artifactId>norwegian-social-security-number-validator</artifactId>
<version>2.0.9</version>
</dependency>
val valid = validateSocialSecurityAndDNumber11Digits("01013999900")
Make sure you have the Java JDK 21 installed You can check which version you have installed using this command:
java -version
To build locally and run the integration tests you can simply run
./gradlew clean build
or on windows
gradlew.bat clean build
Find the newest version of gradle here: https://gradle.org/releases/ Then run this command:
./gradlew wrapper --gradle-version $gradleVersjon
Artifact publish is done by GitHub Actions, and publish to Maven Central
This project is maintained by CODEOWNERS
Questions and/or feature requests? Please create an issue
To get started, please fork the repo and checkout a new branch. See more info in CONTRIBUTING.md