-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Labels
c: bugSomething isn't workingSomething isn't workingc: localePermutes locale definitionsPermutes locale definitionsm: locationSomething is referring to the location moduleSomething is referring to the location modulep: 1-normalNothing urgentNothing urgent
Milestone
Description
Pre-Checks
- Follow our Code of Conduct.
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Faker issue and not related to a combination with another package.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
- I am willing to provide a PR.
Describe the bug
When generating zip codes (postal codes) using the en_CA locale, invalid codes are generated. The characters D
, F
, I
, O
, Q
, or U
are not used in postal codes. This is can cause the randomly generated codes to fail validation.
Minimal reproduction code
const { faker } = require('@faker-js/faker');
faker.locale = 'en_CA';
console.log(faker.address.zipCode());
Additional Context
No response
Environment Info
System:
OS: macOS 12.3
CPU: (8) arm64 Apple M1 Pro
Memory: 96.56 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.17.0 - /opt/homebrew/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 8.15.0 - /opt/homebrew/bin/npm
Browsers:
Brave Browser: 106.1.44.101
Chrome: 105.0.5195.52
Safari: 15.4
npmPackages:
@faker-js/faker: ^7.5.0 => 7.5.0
Which module system do you use?
- CJS
- ESM
Used Package Manager
npm
Metadata
Metadata
Assignees
Labels
c: bugSomething isn't workingSomething isn't workingc: localePermutes locale definitionsPermutes locale definitionsm: locationSomething is referring to the location moduleSomething is referring to the location modulep: 1-normalNothing urgentNothing urgent