Comments (3)
Hey, very great find and great investigation work @dangerman. 👍 Thank you for this.
If we already have a data_extend
for iban
formats, which it looks like we do; then yes, I would accept a PR/patch for this specific CR (Costa Rica) IBAN issue that updates data_extend:en/iban/cr
.
You're absolutely correct on the proposed fix:
- patch
data_extend
- write a unit test
Bogus.Tests/GitHubIssues/Issue538.cs
and running gulp importLocales
should gather all the JSON; merge data_extend
, and finally write the necessary BSON resource files for Bogus.dll
.
Just a few more points:
- Reference this GH issue number #538 in your PR.
- Keep the PR/change-set strictly focused on this kind of change (ie: don't include any code reformatting); keep the PR/changes strictly on topic. If you'd like to change something else off-topic; feel free to set up a new GH issue or PR for those off-topic changes and we can discuss. 👍
The README.md
section for Building From Source should have the latest docs on the build basics for the Bogus repo (including node js dependencies etc):
Roadmap wise, right now Bogus is basically around fakerjs v5 API + dataset parity. Longer term, we'll be catching up to v8 API + datasets; which is why some of these datasets might be outdated and as we catch up; hopefully a lot of these issues will be resolved automatically.
from bogus.
I looked into this and it seems like it's a bug that was already fixed in faker.js a couple years ago: faker-js/faker#643
In summary:
The Costa Rican IBAN format is missing an extra
0
(reserve number) before the banking code.
(For reference: https://bank-code.net/iban/structure/costa-rica-international-bank-account-number)
Locale data
Bogus IBAN generation appears to use the iban_formats
from the locale data:
Bogus/Source/Bogus/DataSets/Finance.cs
Lines 375 to 377 in 80e68d7
And according to the documentation, this comes from:
- the faker.js locale data from the faker submodule (from like 3 years ago, before the fix)
- and the locales in
data_extend
, which take priority.
Proposed fix
We've already got iban_formats
in the data_extend
en locale, so we can just update it there and run gulp importLocales
, right?
Bogus/Source/Bogus/data_extend/en.locale.json
Lines 471 to 485 in 80e68d7
@bchavez is it alright if I raise a PR with:
- a fix in the en locale in
data_extend
- a test in
Bogus.Tests/GitHubIssues
?
from bogus.
Thank you @dangerman for the PR; excellent and super great work.
The CR IBAN fix is now available in Bogus v35.5.1
:
Thanks again for the bug report and PR fix. 👍 🚀
from bogus.
Related Issues (20)
- Faker.Tv() is missing from Bogus.Hollywood HOT 3
- Feature request: New localized data: Word(s).
- Add ability to except random numbers HOT 2
- Update Denmark (da) locale from faker-js
- Nuget for .NET 8.0.x HOT 4
- Random history facts generation
- Are Randomizer's number ranges inclusive or exclusive? HOT 3
- bogus is missing NuGet package README file HOT 1
- .NET 8 support HOT 9
- Gender-digit is incorrect for Swedish Personnummer generation HOT 3
- Switch to licence expression rather than URL HOT 1
- Add hungarian (hu) locale from faker-js HOT 2
- How to make convert to generic method HOT 6
- Fakers used inside Rules of other Fakers share the same object reference HOT 2
- Determinism with Custom Datasets HOT 1
- Include the increment count for the Rules Expressions HOT 1
- Stack memory issue in locale tests (overflows on Mac) HOT 2
- Update `zh_CN` dataset to latest HOT 3
- private setters workaround is not working for generic types
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bogus.