Skip to content

Conversation

@ds1371dani
Copy link
Contributor

fix(isIban): remove hard coded zero digit from iran iban

I have replaced the 0 digits in the IR iban pattern because there is no rule for such pattern. the only place i found where IR iban has been discussed is this wikipedia page

the reason for this adjustment is that i need to add Iran iban to fakerjs library which is testing the valid ibans with this library

Checklist

  • PR contains only changes related; no stray files, etc.
  • README updated (not needed)
  • Tests written (not needed)
  • References provided in PR (where applicable)

@codecov
Copy link

codecov bot commented Nov 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (9113304) to head (c7c26c2).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #2634   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          114       114           
  Lines         2566      2566           
  Branches       651       651           
=========================================
  Hits          2566      2566           

☔ 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.

@WikiRik WikiRik changed the title adjust iran iban fix(isIBAN): improve IR locale Nov 22, 2025
Copy link
Member

@WikiRik WikiRik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional sources I could find do indeed not mention a 0 at the start

Copy link
Member

@WikiRik WikiRik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woops, I was too quick. Could you add additional tests for valid IBANs that do not start with a 0?

@ds1371dani
Copy link
Contributor Author

of course, i added some initial tests for isIBAN (didn't have any tests before)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this to the large validator file, where we already have the other isIBAN tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, so sorry didn't see it

done

@WikiRik WikiRik requested a review from rubiin November 22, 2025 10:53
@rubiin rubiin merged commit a165ebe into validatorjs:master Nov 22, 2025
12 checks passed
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.

3 participants