Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect validation results for Chinese ID cards, some specific area codes cannot pass validation #442

Open
moe001 opened this issue Jun 4, 2024 · 1 comment

Comments

@moe001
Copy link

moe001 commented Jun 4, 2024

For ID card numbers starting with 412723, they are indeed valid in reality, but this library considers them invalid. This area code is no longer in use due to some administrative adjustments, but people born before the change still have ID numbers starting with this code. Therefore, there are still a large number of people with ID numbers starting with this code.

Example: This official announcement clearly shows many ID numbers starting with this code (http://zrzyhghj.xuchang.gov.cn/xxgg/013002/20190822/b1eab7b9-b5d1-4405-83bc-c32cc0ace220.html)

@arthurdejong
Copy link
Owner

Thanks for reporting this. Do you know if there is a list of historic area codes that are considered valid? The list of locations is currently taken from https://github.com/cn/GB2260 I can't read Chinese so I read things via Google Translate which is far from ideal.

Validating the location part of the number is really nice because it greatly limits the numbers that are considered valid. If there are just a handful of old area codes I can add them to a separate list but if there are many the location verification should probably become optional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants