# stdnum.kr.brn

BRN (사업자 등록 번호, South Korea Business Registration Number).

The Business Registration Number is issued by the district tax office in the local jurisdiction for tax purposes. The number consists of 10 digits and contain the tax office number (3 digits), the type of business (2 digits), a serially assigned value (4 digits) and a single check digit.

More information:

- https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Korea-TIN.pdf

    >>> validate('116-82-00276')
    '1168200276'
    >>> validate('1168200276')
    '1168200276'
    >>> validate(' 116 - 82 - 00276  ')
    '1168200276'
    >>> validate('123456789')
    Traceback (most recent call last):
        ...
    InvalidLength: ...
    >>> format('1348672683')
    '134-86-72683'

stdnum.kr.brn.compact(number: str) → str

  Convert the number to the minimal representation.

  This strips the number of any valid separators and removes surrounding whitespace.

stdnum.kr.brn.format(number: str) → str

  Reformat the number to the standard presentation format.

stdnum.kr.brn.is_valid(number: str) → bool

  Check if the number is a valid South Korea BRN number.

stdnum.kr.brn.validate(number: str) → str

  Check if the number is a valid South Korea BRN number.

  This checks the length and formatting.