-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
feat(isAlpha, isAlphanumeric): add support for Indic locales (ta-IN, te-IN, kn-IN, ml-IN, gu-IN, pa-IN, or-IN) #2576
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
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2576 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 114 114
Lines 2535 2535
Branches 641 641
=========================================
Hits 2535 2535 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Hey reviewer!
let me know If I have to do anything else... |
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 seven Indic languages (Tamil, Telugu, Kannada, Malayalam, Gujarati, Punjabi, and Odia) to the isAlpha
and isAlphanumeric
validator functions. The implementation includes Unicode character ranges for each language, appropriate decimal handling, and comprehensive test coverage.
- Adds Unicode regex patterns for seven Indic locales covering their respective character ranges
- Updates decimal and comma decimal configurations for the new locales
- Provides comprehensive test coverage with valid and invalid test cases for each language
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/lib/alpha.js | Adds Unicode regex patterns for Indic languages and updates decimal configurations |
test/validators.test.js | Adds comprehensive test cases for all seven new Indic language validators |
README.md | Updates documentation to include the new supported locales in isAlpha and isAlphanumeric descriptions |
Comments suppressed due to low confidence (1)
test/validators.test.js:1988
- The Bengali (bn-IN) locale is being tested but was not mentioned in the PR title or description as one of the new Indic locales being added. This test appears to be for an existing locale rather than a newly added one.
it('should validate Bengali alpha strings', () => {
Are there any other issues? |
@chriso @rubiin @profnandaa Am I needed to do any other changes or the code is perfect to be merged ? |
Removed unwanted npm-debug.log ( Generated at my end )
Changes included:
Test ResultsChecklist
Thank you for reviewing! @WikiRik |
Changes included:
Test ResultsChecklist
Thank you for reviewing! @WikiRik |
Changes included:
Test ResultsChecklist
Thank you for reviewing! @WikiRik |
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.
Thanks for working on this and incorporating all of my comments!
You'll be mentioned in the release notes of the next release (which I will draft after #2574 is merged) . GitHub mentions you as 'Contibutor' in new PRs and comments, but that is not something we control. GitHub does that last bit automatically |
This commit introduces Indic language support into
isAlpha
andisAlphanumeric
methods.Languages added:
ta-IN
) | Reference Character Sette-IN
) | Reference Character Setkn-IN
) | Reference Character Setml-IN
) | Reference Character Setgu-IN
) | Reference Character Setpa-IN
) | Reference Character Setor-IN
) | Reference Character SetTest Result
Checklist