EIN (U.S. Employer Identification Number).
The Employer Identification Number, also known as Federal Employer Identification Number (FEIN), is used to identify a business entity in the United States. It is issued to anyone that has to pay withholding taxes on employees.
>>> validate('91-1144442')
'911144442'
>>> get_campus('04-2103594') == 'Brookhaven'
True
>>> validate('911-14-4442') # dash in the wrong place
Traceback (most recent call last):
...
InvalidFormat: ...
>>> validate('07-1144442') # wrong prefix
Traceback (most recent call last):
...
InvalidComponent: ...
>>> format('042103594')
'04-2103594'
Traceback (most recent call last):
...
InvalidComponent: ...
Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.
Reformat the passed number to the standard format.
Determine the Campus or other location that issued the EIN.
Checks to see if the number provided is a valid EIN. This checks the length, groups and formatting if it is present.
Checks to see if the number provided is a valid EIN. This checks the length, groups and formatting if it is present.