#card #identification #china #validation #id

china_identification_card

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

8 releases

0.2.6 Feb 9, 2025
0.2.5 Jan 20, 2025
0.2.2 Dec 8, 2024
0.2.1 Nov 30, 2024
0.1.1 Nov 1, 2024

#336 in Authentication

Download history 176/week @ 2024-10-26 81/week @ 2024-11-02 4/week @ 2024-11-09 3/week @ 2024-11-16 148/week @ 2024-11-30 166/week @ 2024-12-07 6/week @ 2024-12-14 316/week @ 2025-01-18 1/week @ 2025-01-25 27/week @ 2025-02-01 112/week @ 2025-02-08

456 downloads per month

MIT license

7KB
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