-
Notifications
You must be signed in to change notification settings - Fork 31
fix: add Anguilla tax id #138
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
Conversation
Summary of ChangesHello @koblas, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request expands the library's international identifier validation capabilities by adding support for the Anguilla Tax Identification Number (TIN). It provides robust validation logic, proper formatting, and seamless integration, ensuring that Anguilla TINs can be accurately processed and verified within the system. Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Pull Request Overview
This PR adds support for Anguilla Tax Identification Number (TIN) validation to the library, expanding the supported countries for tax ID validation.
- Added complete implementation of Anguilla TIN validator with proper formatting and validation logic
- Updated release workflow permissions for OIDC authentication
- Added documentation entry for the new Anguilla TIN support
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/index.ts | Imports new AI module and registers TIN validator for both person and entity validation |
| src/ai/tin.ts | Implements Anguilla TIN validation logic with 9-digit format and prefix validation |
| src/ai/tin.spec.ts | Comprehensive test suite covering valid/invalid formats and edge cases |
| src/ai/index.ts | Module export file for AI country validators |
| README.md | Documentation update adding Anguilla TIN to supported countries table |
| .github/workflows/release.yaml | Adds OIDC permissions for GitHub Actions workflow |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
Code Review
This pull request aims to add support for the Anguilla Tax Identification Number (TIN). While the intent is good, the current implementation has several critical issues. The validation logic incorrectly assumes a 9-digit TIN, whereas the official OECD documentation cited in the code specifies a 10-digit number. This discrepancy affects length checks, formatting, and tests. Additionally, the logic to determine if a TIN belongs to an individual or a company is flawed. I've left specific comments on these points. Furthermore, this PR includes unrelated changes for Ghana, Taiwan, and Vietnam, which would be better handled in a separate pull request to maintain a clean commit history.
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.
Pull Request Overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/ai/tin.ts
Outdated
| isValid: true, | ||
| compact: value, | ||
| isIndividual: prefix == '1', | ||
| isCompany: prefix == '2', |
Copilot
AI
Oct 15, 2025
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.
Use strict equality operators (===) instead of loose equality (==) for type safety and consistency with TypeScript best practices.
| isCompany: prefix == '2', | |
| isCompany: prefix === '2', |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.