Added support for zh-HK in isIdentityCard#2142
Added support for zh-HK in isIdentityCard#2142profnandaa merged 10 commits intovalidatorjs:masterfrom
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. |
profnandaa
left a comment
There was a problem hiding this comment.
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