55
Is there an algorithm to check the validity of a RG number in Brazil using check digits, as with the CPF? If yes, how is this algorithm?
55
Is there an algorithm to check the validity of a RG number in Brazil using check digits, as with the CPF? If yes, how is this algorithm?
51
National? No, the ID does not have unified numbering. A single individual may have Rgs issued by 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 organ algorithm (someone spoke in mod 11), but I doubt that there is a register/register of issuing organ pairs and validation modes.
It even has RG numbers that the checker digit is 'X'
True. In fact, the digit is not considered part of RG (or CPF), serving only for typing validation.
There are even RG numbers without DV
18
Not Standard, each state is Free on RG Issue, the format varies from state to state, if it is really necessary to validate RG, do as most I see, ask for the photo or scan of the document.
For all the systems I did that needed validation I used the CPF, for being unique
5
You can validate whether a RG number is valid through a yes algorithm as already mentioned above. Details on this website, where the step-by-step calculations are explained. However, it is essential to highlight 2 points: the fact that the GR is valid does not mean that it exists, only that it is mathematically consistent; and each Federation Unit (including the Federal District) registers its General Registry independently, so that a person can have up to 27 General Records (although a process of gradual unification is underway, the RIC).
P.S.: In spite of each FU issuing the RG independently, the calculation is the same (except perhaps in older records, before the standardization).
Site details should be state-specific. My ID (PR) has not been validated correctly.
But has your ID been issued recently or is it old? Because it seems to me that standardization is relatively recent.
My first ID was issued almost 20 years ago. The numbering never changed.
By the way the standardization was only for documents issued from that date.
I even understand that this validator can work for Rgs issued from a certain date, but in my opinion "systemically" speaking, a validator should only be implemented if it is 100% efficient, otherwise this may cause inconvenience to system users and administrators.
3
The RG check digit calculation uses module 11. The CPF uses the same algorithm twice. More details: http://en.wikipedia.org/wiki/Check_digit
This other link can also be very helpful. : ) http://www.profcardy.com/cardicas/rg.php
This is not true for many states, including older Rgs that do not even have validation digit.
Yes, @Netomarin, you’re right. But the question is about how validation with digits is performed. Thus, when the digit is used, its calculation is normally performed with module 11.
0
RG’s are state-issued records(UF). Each state has different rules and quantities of numbers in the registry. Not a reliable source to ensure the uniqueness of a data.
Therefore, there are several algorithms like some already mentioned here.
Check this out: http://meta.answall.com/questions/508/o-que-fazer-com-duplicatedreplies
Browser other questions tagged algorithm brazil validation
You are not signed in. Login or sign up in order to post.
A great example of a question that only makes sense here, at in Portuguese :)
– talles