-
-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Description of the new functionality:
I would like to request a new functionality for the RG format validation. It would be helpful to have a function that can validate whether a given string matches the format of a valid RG number.
The RG (acronym for Registro Geral) is a Brazilian identification document, which contains personal information such as full name, date of birth, and a unique number.
For example, given the string "12.345.678-9", the new function would return true if it matches the format of a valid RG number in Brazil.
To validate the format of the RG number, it is necessary to follow the following rules:
The RG number must have 9 digits, separated by a period and a hyphen, in the following format: XX.XXX.XXX-X, where X represents a numeric digit from 0 to 9.
The first two digits represent the state where the RG was issued.
The next three digits represent the RG registration number.
The last digit is a verification digit.