Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restrict EIN to valid prefixes #1909

Open
wants to merge 1 commit into
base: master
from

Conversation

@hynkle
Copy link

@hynkle hynkle commented Jan 14, 2020

Issue#

No-Story

Description:

This PR changes Company#ein to produce only EINs that start with a prefix that the IRS (the issuing authority) actually uses rather than producing the digits purely at random. The list of valid prefixes comes from the IRS's "How EINs are Assigned and Valid EIN Prefixes". The format of the returned string is unchanged, so this is a non-breaking change.

We ran into this in our application where we have stricter validation for the format of EINs (looking at their prefix), and Faker would sometimes produce EINs that ran afoul of that violation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.