Skip to content

Conversation

@abpaul1993
Copy link
Contributor

@abpaul1993 abpaul1993 commented Dec 5, 2025

Closes #

This PR enhances our number parsing and validation logic to support all major Unicode numeral systems recognized by Intl.NumberFormat in validateNumberSeparators method along with the valid decimal and group seperator.
Previously, only Western digits were handled in the method.
With this update, the number input component now correctly accepts, validates, and normalizes numerals from multiple writing systems—matching real-world locale behavior across international users.

Changelog

New

  1. Enhanced number parsing and validation to support all major Unicode numeral systems recognized by Intl.NumberFormat.
  2. The validateNumberSeparators method now supports locale-specific decimal and grouping separators along with non-Western numerals.

Changed

  • validateNumberSeparators, which was previously available for custom validation, has been updated to support Arabic and other Unicode numeral systems.
  • Number input validation now normalizes and validates numerals from multiple writing systems instead of only Western digits.

Removed

  • {{removed thing}}

Testing / Reviewing

  • Verify that number inputs accept numerals from different Unicode numeral systems (e.g., Arabic-Indic, Devanagari).
  • Confirm that locale-specific decimal and grouping separators are correctly validated.
  • Ensure existing Western digit inputs continue to work as expected.
  • Validate that custom validations using validateNumberSeparators behave correctly across locales.

PR Checklist

As the author of this PR, before marking ready for review, confirm you:

  • Reviewed every line of the diff
  • Updated documentation and storybook examples
  • Wrote passing tests that cover this change
  • Addressed any impact on accessibility (a11y)
  • Tested for cross-browser consistency
  • Validated that this code is ready for review and status checks should pass

More details can be found in the pull request guide

@abpaul1993 abpaul1993 requested a review from a team as a code owner December 5, 2025 15:14
@netlify
Copy link

netlify bot commented Dec 5, 2025

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit dd242b2
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-web-components/deploys/6932f6d56cbc870008e27631
😎 Deploy Preview https://deploy-preview-21135--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

❌ Patch coverage is 87.65432% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.60%. Comparing base (7da22c2) to head (dd242b2).
⚠️ Report is 39 commits behind head on main.

Files with missing lines Patch % Lines
...s/react/src/components/NumberInput/NumberInput.tsx 87.65% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #21135      +/-   ##
==========================================
- Coverage   92.62%   92.60%   -0.02%     
==========================================
  Files         515      515              
  Lines       38225    38299      +74     
  Branches     5861     5866       +5     
==========================================
+ Hits        35406    35467      +61     
- Misses       2670     2682      +12     
- Partials      149      150       +1     
Flag Coverage Δ
main-packages 85.63% <87.65%> (+0.01%) ⬆️
web-components 96.89% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@netlify
Copy link

netlify bot commented Dec 5, 2025

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit dd242b2
🔍 Latest deploy log https://app.netlify.com/projects/carbon-elements/deploys/6932f6d4fb47a70008cd8bc2
😎 Deploy Preview https://deploy-preview-21135--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Dec 5, 2025

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit dd242b2
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-react/deploys/6932f6d4d113700008c3d918
😎 Deploy Preview https://deploy-preview-21135--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kennylam
Copy link
Member

@abpaul1993 Please update the Changelog, Testing/Reviewing, and PR Checklist in the PR description. Thanks!

@alisonjoseph alisonjoseph removed the request for review from tay1orjones December 12, 2025 20:01
@abpaul1993
Copy link
Contributor Author

abpaul1993 commented Dec 14, 2025

@kennylam I have updated the PR details based on the feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants