koblas / stdnum-js

A JavaScript library to provide functions to handle, parse and validate standard numbers.
MIT License
38 stars 26 forks source link

Taiwan UI/ID questions - comparing results to https://identity.tw/ #109

Closed teebu closed 7 months ago

teebu commented 9 months ago

The UI should be two alphabetic letters followed by an eight-digit numeric string. The ID should be a ten-digit code with the first an alphabetic letter followed by a nine-digit

Neither the ID nor the UI values, taken from spec file, return true when checked against https://identity.tw/

(maybe the site isnt working properly) id: A200501503 - not valid -> https://www.myfakeinfo.com/check/validate-chinataiwan-icnumber.php ui: A800501509 - also not valid when checked here -> https://www.myfakeinfo.com/check/validate-chinataiwan-icnumber.php

ui: CC00151114 - invalid in lib ui: CC00151114 - valid -> https://identity.tw/

Another lib i didnt check yet: https://github.com/doggy8088/taiwan-id-validator2/blob/master/src/index.ts

both the new and current resident numbers present on the lib above pass the identity.tw validations.

isResidentCertificateNumberValid('AA00000009')) // 居留證編號 (舊式與新式) isNewResidentCertificateNumberValid('A800000014')) // 新式居留證編號

koblas commented 8 months ago

Thanks again for finding these!