# stdnum.ua.rntrc

РНОКПП, RNTRC (Individual taxpayer registration number in Ukraine).

The РНОКПП (Реєстраційний номер облікової картки платника податків, registration number of the taxpayer’s registration card) is a unique identification number that is provided to individuals within Ukraine. The number consists of 10 digits, the last being a check digit.

More information:

- https://uk.wikipedia.org/wiki/РНОКПП

    >>> validate('1759013776')
    '1759013776'
    >>> validate('1759013770')
    Traceback (most recent call last):
        ...
    InvalidChecksum: ...
    >>> validate('12345')
    Traceback (most recent call last):
        ...
    InvalidLength: ...
    >>> format(' 25 30 41 40 71 ')
    '2530414071'

stdnum.ua.rntrc.calc_check_digit(number: str) → str

  Calculate the check digit for number.

stdnum.ua.rntrc.compact(number: str) → str

  Convert the number to the minimal representation.

stdnum.ua.rntrc.format(number: str) → str

  Reformat the number to the standard presentation format.

stdnum.ua.rntrc.is_valid(number: str) → bool

  Check if the number is a valid Ukraine RNTRC (РНОКПП) number.

stdnum.ua.rntrc.validate(number: str) → str

  Check if the number is a valid Ukraine RNTRC (РНОКПП) number.

  This checks the length, formatting and check digit.