norwegian-tin-validator 0.1.0

A Norwegian TIN (Tax Identification Number) validator library
Documentation
  • Coverage
  • 0%
    0 out of 21 items documented0 out of 9 items with examples
  • Size
  • Source code size: 38.1 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 486.4 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 7s Average build duration of successful builds.
  • all releases: 7s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • khopland/norwegian-tin-validator
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • khopland

norwegian-tin-validator

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.

Features

  • Validate Norwegian TINs (F-numbers and D-numbers)
  • Support for new TIN format (from 2032)
  • Handles synthetic test TINs
  • Supports all test IDs used by Skatteetaten
  • Simple API for integration

Installation

Add to your Cargo.toml:

norwegian-tin-validator = "0.1"

Usage

Rust

use norwegian_tin_validator::NorwegianTin;

fn main() {
    let tin = "01010112345";
    if NorwegianTin::parse(tin).is_ok() {
        println!("Valid Norwegian TIN!");
    } else {
        println!("Invalid TIN.");
    }
}

Documentation

License

Apache-2.0 License. See the LICENSE file for details.

Contributing

Contributions and issues are welcome! Please open an issue or pull request on GitHub.

Acknowledgements

Based on official documentation from Skatteetaten.