Many projects use a personal account number in the system or some equivalent of it to identify a client. But only occasionally he is given due attention. Usually, personal accounts are a sequence of natural numbers. Naturally, when recruiting such a personal account, it is easy to make a mistake and send your blood uncle to the village.
Meanwhile, the way to get rid of this problem is simple. It is used to create any bank account (by the way, Yandex Money also uses it). All you need to do is add a check number to your personal account. Now, when entering data by checking the control number, we will reduce the number of errors in the set. Of course, we will not fully protect ourselves, but the probability of an error will decrease.
Example : validation of a ten-digit TIN:
1. Calculate the checksum with the following weighting factors: (2,4,10,3,5,9,4,6,8,0)
2. Calculates the check number as the remainder of dividing the checksum by 11
3. If the control number is greater than 9, then the control number is calculated as the remainder of dividing the control number by 10
4. The control number is checked with the tenth sign of the TIN. If they are equal, the TIN is considered correct.
')
More examples