A simple validator for, validation a norwegian organization number
See brreg organisasjonsnummer for more info on how validation of a norwegian organization number is done
- Kotlin
- Gradle
- JDK 21
Gradle(kotlin)
implementation("io.github.mikaojk:norwegian-organization-number-validator:2.0.4")
Maven
<dependency>
<groupId>io.github.mikaojk</groupId>
<artifactId>norwegian-organization-number-validator/artifactId>
<version>2.0.4</version>
</dependency>
import io.github.mikaojk.validator.validNorwegianOrganizationNumber
val validOrganizationNumber = validNorwegianOrganizationNumber("810009152")
if (validOrganizationNumber) {
println("Orgnumber is valid")
} else {
println("Orgnumber is invalid")
}
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 and GitHub Packages
This project uses semantic versioning and does NOT prefix tags or release titles with v
i.e. use 1.2.3
instead of v1.2.3
see guide about how to relese:creating release GitHub
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