-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Added support for zh-HK in isIdentityCard #2142
Conversation
Codecov ReportBase: 100.00% // Head: 100.00% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## master #2142 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 104 104
Lines 2308 2328 +20
Branches 578 584 +6
=========================================
+ Hits 2308 2328 +20
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the contrib! 🎉
kind of overlooked this, but question here is the same regarding the usage of should sanitizing the string really be part of the validator? I would say "no". |
Apologies for not noticing this point. Actually, I share the same thought with you: this validator should only take care about the validation part. However, I noticed other contributors in
To make my codes consistent with others, I believe it is better to keep the sanitization before validation. |
Added support for zh-HK in isIdentityCard
Supports validation for HKID (Hong Kong Identity Card)
RegEx and checksum used, compatible with new HKIDs starting with 2 letters.
Checklist