{"id":33914887,"url":"https://github.com/guanting112/taiwan-id-validator","last_synced_at":"2026-01-13T21:59:03.980Z","repository":{"id":328098263,"uuid":"1113197730","full_name":"guanting112/taiwan-id-validator","owner":"guanting112","description":"快速驗證台灣身分證、居留證、統一編號 / twid is a lightweight and zero-dependency Go package for validating Taiwan National IDs, Alien Resident Certificates (ARC), and Unified Business Numbers (UBN)","archived":false,"fork":false,"pushed_at":"2025-12-09T19:04:27.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-13T11:51:16.429Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/guanting112/taiwan-id-validator","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guanting112.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-09T16:46:32.000Z","updated_at":"2025-12-10T17:26:11.000Z","dependencies_parsed_at":"2025-12-12T00:01:12.112Z","dependency_job_id":null,"html_url":"https://github.com/guanting112/taiwan-id-validator","commit_stats":null,"previous_names":["guanting112/taiwan-id-validator"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/guanting112/taiwan-id-validator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guanting112%2Ftaiwan-id-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guanting112%2Ftaiwan-id-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guanting112%2Ftaiwan-id-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guanting112%2Ftaiwan-id-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guanting112","download_url":"https://codeload.github.com/guanting112/taiwan-id-validator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guanting112%2Ftaiwan-id-validator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28400397,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-12T06:43:25.890Z","updated_at":"2026-01-13T21:59:03.972Z","avatar_url":"https://github.com/guanting112.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Taiwan ID Validator (twid)\n\n[![Go Test](https://github.com/guanting112/taiwan-id-validator/actions/workflows/go.yml/badge.svg)](https://github.com/guanting112/taiwan-id-validator/actions/workflows/go.yml)\n[![Go Reference](https://pkg.go.dev/badge/github.com/guanting112/taiwan-id-validator.svg)](https://pkg.go.dev/github.com/guanting112/taiwan-id-validator)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n`twid` is a lightweight and zero-dependency Go package for validating Taiwan National IDs, Alien Resident Certificates (ARC), and Unified Business Numbers (UBN).\n\nIt supports:\n- **Taiwan National ID** (中華民國身分證字號)\n- **New Alien Resident Certificate** (新式外來人口統一證號) (Since 2021)\n- **Old Alien Resident Certificate** (舊式外來人口統一證號)\n- **Unified Business Number (UBN)**: Validates company tax IDs, fully supporting the latest logic (including the 7th-digit rule). (新舊格式的統一編號)\n\n## Installation\n\n```bash\ngo get github.com/guanting112/taiwan-id-validator\n```\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\ttwid \"github.com/guanting112/taiwan-id-validator\"\n)\n\nfunc main() {\n\t// National ID\n\tfmt.Println(twid.Validate(\"A123456789\"))         // true\n\tfmt.Println(twid.ValidateNationId(\"A123456789\")) // true\n\tfmt.Println(twid.ValidateNationId(\"A123456700\")) // false\n\n\t// Taiwan Company UBN\n\tfmt.Println(twid.ValidateUbn(\"84149961\")) // true\n\tfmt.Println(twid.ValidateUbn(\"22099131\")) // true\n\tfmt.Println(twid.ValidateUbn(\"!@)(#\u00266y01)\")) // false\n\tfmt.Println(twid.ValidateUbn(\"25317520\")) // false\n\tfmt.Println(twid.ValidateUbn(\"00000000\")) // false\n\n\t// New ARC\n\tfmt.Println(twid.Validate(\"A800000014\"))      // true\n\tfmt.Println(twid.ValidateArcId(\"A800000014\")) // true\n\tfmt.Println(twid.ValidateArcId(\"A800000015\")) // false\n\n\t// Old ARC\n\tfmt.Println(twid.Validate(\"AC01234567\"))      // true\n\tfmt.Println(twid.ValidateArcId(\"AC01234567\")) // true\n\n\t// Invalid\n\tfmt.Println(twid.Validate(\"A123456788\")) // false\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguanting112%2Ftaiwan-id-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguanting112%2Ftaiwan-id-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguanting112%2Ftaiwan-id-validator/lists"}