| Crates.io | norwegian-tin-validator |
| lib.rs | norwegian-tin-validator |
| version | 0.1.0 |
| created_at | 2025-09-05 22:46:22.336427+00 |
| updated_at | 2025-09-05 22:46:22.336427+00 |
| description | A Norwegian TIN (Tax Identification Number) validator library |
| homepage | |
| repository | https://github.com/khopland/norwegian-tin-validator |
| max_upload_size | |
| id | 1826371 |
| size | 38,087 |
A robust Norwegian TIN (Tax Identification Number) validator library supporting both D-numbers and F-numbers, including the new TIN format introduced in 2032. Also supports all synthetic test TINs and all test IDs used by Skatteetaten.
Add to your Cargo.toml:
norwegian-tin-validator = "0.1"
use norwegian_tin_validator::NorwegianTin;
fn main() {
let tin = "01010112345";
if NorwegianTin::parse(tin).is_ok() {
println!("Valid Norwegian TIN!");
} else {
println!("Invalid TIN.");
}
}
Apache-2.0 License. See the LICENSE file for details.
Contributions and issues are welcome! Please open an issue or pull request on GitHub.
Based on official documentation from Skatteetaten.