-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add basic ID validation and information extraction. #47
Conversation
PR Description updated to latest commit (af92fea)
|
PR Review
✨ Review tool usage guide:Overview: The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
See the review usage page for a comprehensive guide on using this tool. |
PR Code Suggestions
✨ Improve tool usage guide:Overview:
See the improve usage page for a comprehensive guide on using this tool. |
User description
增加了一个除地址信息码之外的基础信息校验和信息提取。
在实际使用中发现,地址码更新会导致实名失败,所以提供一种去除地址码的固定规则校验,不随政策随时变化,更适合企业生产环境使用。
Type
Enhancement, Tests
Description
idvalidator
with functions to validate and extract basic ID card information excluding address code.IsValidBasic
to validate ID cards based on order code, birthday code, and check bit, excluding address code.GetBasicInfo
to extract information such as birthday, sex, and zodiac signs from ID cards.Changes walkthrough
id_validator_basic.go
Implement Basic ID Validation and Information Extraction
id_validator_basic.go
idvalidator
.IsValidBasic
function to validate ID card numbersexcluding address code.
GetBasicInfo
function to extract basic ID card informationexcluding address code.
BasicIdInfo
struct to hold the extracted ID information.id_validator_basic_test.go
Add Tests for Basic ID Validation and Information Extraction
id_validator_basic_test.go
IsValidBasic
to ensure it correctly identifies invalidIDs.
GetBasicInfo
to ensure it returns correct results anderrors appropriately.