Skip to content

Fix iso6346 malformed strings#2797

Open
SarthakDudhe wants to merge 3 commits into
validatorjs:masterfrom
SarthakDudhe:fix-iso6346-malformed-strings
Open

Fix iso6346 malformed strings#2797
SarthakDudhe wants to merge 3 commits into
validatorjs:masterfrom
SarthakDudhe:fix-iso6346-malformed-strings

Conversation

@SarthakDudhe

Copy link
Copy Markdown

The fix for Issue #2772 is complete and verified!
Grouped and anchored the alternation in isISO6346Str regex in
isISO6346.js
to prevent matching malformed strings with leading/trailing characters.
Corrected the character set from [J,Z] to [JZ] to remove the literal comma match.
Added comprehensive invalid tests for both isISO6346 and isFreightContainerID in
validators.test.js
and verified that all 318 tests pass successfully.

@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (a38f15b) to head (3c1354c).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #2797   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          114       114           
  Lines         2587      2587           
  Branches       656       656           
=========================================
  Hits          2587      2587           

☔ View full report in Codecov by Harness.
📢 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.

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.

1 participant