#card #identification #china #validation #id

china_identification_card

A Rust library for validating Chinese identification card numbers based on official rules and checksums

4 releases

0.2.2 Dec 8, 2024
0.2.1 Nov 30, 2024
0.1.1 Nov 1, 2024
0.1.0 Nov 1, 2024

#318 in Authentication

Download history 216/week @ 2024-10-28 45/week @ 2024-11-04 3/week @ 2024-11-18 122/week @ 2024-11-25 158/week @ 2024-12-02 40/week @ 2024-12-09

323 downloads per month

MIT license

6KB
53 lines

China Identification Card

Official Documentation

A Rust library for validating Chinese identification card numbers based on official rules and checksums.

Features

  • Validates the length and format of a Chinese identification card number
  • Calculates and verifies the checksum according to official weight factors
  • Lightweight and easy to integrate

Installation

To use this crate, you can run cmd:

cargo add china_identification_card

Examples

use china_identification_card::*;
let is_valid: bool = is_valid_id_number("110101202311012176");

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

Contact

For any inquiries, please reach out to the author at ltpp-universe root@ltpp.vip.

No runtime deps