| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
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. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM, thanks for the contrib! 🎉
Sorry, something went wrong.
|
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". |
Sorry, something went wrong.
|
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 isIdentityCard.js all wrote codes to sanitize the incoming string: const sanitized = str.trim().toUpperCase(); const sanitized = str.trim(); To make my codes consistent with others, I believe it is better to keep the sanitization before validation. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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