Skip to content
organisationsnummerPublic

About

Validate Swedish organization numbers

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

2 watching

Forks

Repository files navigation

Organisationsnummer

Crates.io Rust

Validate Swedish organization numbers with Rust. Follows version 1.1 of the specification.

Installation

$ cargo add organisationsnummer-rs

Published on crates.io as organisationsnummer-rs. It replaces the old organisationsnummer crate, which can no longer be updated. To migrate, change the dependency in Cargo.toml to organisationsnummer-rs. The library is still imported as organisationsnummer, so no code changes are needed.

Usage

use organisationsnummer::Organisationsnummer;

fn main() {
    match Organisationsnummer::new("202100-5489") {
        Ok(org) => println!("{}: {}", org.format().long(), org.valid()),
        Err(e) => panic!("Error: {}", e),
    }
}

For more details, see examples and/or run

$ cargo run --example organisationsnummer <organisationsnummer>

In memoriam

Fredrik "Frozzare" Forsmo (1991-2026) was the initiator, co-founder and a core contributor of the organisationsnummer project. This library carries his work. He is missed.

License

MIT

About

Validate Swedish organization numbers

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

2 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages