# Is there any algorithm to check the validity of a RG number in Brazil using digits checkers?

51

Is there any algorithm to check the validity of a RG number in Brazil using digits checkers, as with the CPF? If so, what is this algorithm like?

asked by anonymous 11.12.2013 / 18:27

50

National? No, the RG does not have unified numbering. The same individual may have RGs issued by the local government, may also use functional portfolios such as CREA or CRM or military identities issued by the Army, for example.

Possibly there is an algorithm per organ (someone spoke in mod 11), but I doubt that there is a registration / registration of pairs of sending bodies and validation modes.

11.12.2013 / 18:31
18

It is not Standard, each state is Free on RG Issue, the format varies from state to state, if it is really necessary to validate the RG, do as most I see, ask the photo or scan the document. p>

For all systems that I did that needed validation I used the CPF, because it is unique

11.12.2013 / 18:33
4

You can validate if an RG number is valid through a yes algorithm, as previously mentioned. Details on this site , where step-by-step calculations are explained. However, it is important to highlight two points: the fact that the RG is valid does not mean that it is existing, only that it is mathematically consistent; and each Federal Unit (including the Federal District) independently registers its General Registry, so that a person may have up to 27 General Registries (although a gradual unification process is in progress, the #

P.S .: Although each UF issues the RG independently, the calculation is the same (except perhaps in older records, before standardization).

07.01.2014 / 13:54
2

Calculating the RG check digit uses module 11. The CPF uses the same algorithm twice. More details: link

11.12.2013 / 18:30
-1

RG's are records issued by the state (UF). Each state has different rules and quantities of numbers in the registry. It is not a reliable source to ensure the uniqueness of a given.

Therefore, there are several algorithms like some already mentioned here.

17.01.2014 / 18:46