Professional registration
Registration numbers of professional councils (OAB, CRM, CRO, CRP, CRC).
Validate
- JavaScript library
- Python library
- Go library
- Ruby library22 cases fail
- Rust library
- .NET library
- Erlang library
Checks the structure of a professional council registration number: digit count and UF only, never a check digit.
paramscontains the value, the council (OAB, CRM, CRO, CRP or CRC) and optionally the expected state. The state code is read without regard to case and with surrounding spaces trimmed (2.4.0 compared it as written).- OAB and CRM: 4 to 6 digits plus the UF (
123456/SP,123456-SP). The UF must be a real state code, and it is read without regard to case (12345/spis valid). - CRO: 3 to 6 digits plus the UF (
12345/SP), or the form of art. 115, § 1º, of the Consolidação das Normas do CFO (Resolução CFO-63/2005): the council sigla first (CRO-SP), joined by a hyphen to the category when there is one (TPD,TSB,ASB,APD,CLM/CLF,LPM/LPF,PV,T), then the number, with-ISfor an inscrição secundária or-Rfor an inscrição remida (CRO-SP 12345,CRO-SP-TPD 1234-IS,CRO-SP 12345-R). New in 2.5.0; 2.4.0 rejected this form. - In the art. 115 form, only the cirurgião-dentista (no category) and
TPDmay carry-R.TSB,ASBandAPDmay carry-ISonly, and the other categories no suffix. The UF of the sigla is the one compared with the expected state. - CRP: a 2-digit regional code (
01to24) plus 4 to 6 digits (06/12345). The function ignores the expected state. The CFP system has 24 regionals; the CRP-25 (Amapá) is only a proposal. - CRC: UF, 6 digits, registration type (
OorP) and a check digit (SP-123456/O-3); a transfer appendsTorSand the destination UF (SP-123456/O-3 T-MG). The expected state matches the originating UF. Both UFs must be real state codes. - Only the CRO art. 115 form, the CRC shape and the CRP regional codes rest on a published source. The CRC shape and the
PandSregistrations come from the Manual de Registro (2009); Resolução CFC nº 1.707/2023, in force, only sets a numbering "única e sequencial em cada CRC" and theTof the transfer, and the check digit algorithm is not published. Art. 115 fixes no digit count, so the 3 to 6 CRO digits are conventional, like the OAB and CRM ranges and the CRP body: the OAB and the CFM publish no format. The function does not cover CREA. Two shapes are known to fall outside it: a CRM with a300prefix (physicians trained abroad) or a trailingP(provisional inscription), and an OAB number with 7 digits. params.valueis the registration number,params.councilisOAB,CRM,CRO,CRPorCRC, andparams.stateCodeis the optional expected UF. Aparamsthat is not an object, or one without a stringvalueor a knowncouncil, returnsfalse.- The mask characters (whitespace,
.,-and/) are ignored wherever they sit. Any other character (@, an emoji) makes the value invalid instead of being stripped (12@3456/SPisfalse). Until 2.4.0 such characters were stripped, so12@3456/SPwastrue. - The function never computes a check digit, not even for CRC, whose shape carries one (only its presence and shape are checked).
| Parameter | Type | Required |
|---|---|---|
params | IsValidRegistroProfissionalParams | yes |
params.value | string | yes |
params.council | RegistroProfissionalCouncil | yes |
params.stateCode | StateCode | no |
| returns | boolean |
Check the structure of a professional council registration number (registro/inscrição profissional). Only the digit count and the UF are checked, never a check digit, even for CRC.
-
The separators of the mask (whitespace,
.,-and/) are ignored wherever they sit; any other character (@, an emoji) makes the value invalid instead of being stripped. -
Takes an object (
IsValidRegistroProfissionalParams):value,council("OAB","CRM","CRO","CRP"or"CRC", aRegistroProfissionalCouncil) and an optionalstateCode(expected UF, letter case and surrounding whitespace ignored). -
"OAB"and"CRM": 4 to 6 digits plus the UF (123456/SP,123456-SP);"CRO": 3 to 6 digits (12345/SP), or the form of the Consolidação das Normas do CFO (Resolução CFO-63/2005), art. 115, § 1º: the sigla of the Conselho Regional first, joined by a hyphen to the category (TPD,TSB,ASB,APD,CLM/CLF,LPM/LPF,PV,T) when there is one, then the number, followed by-ISfor a secundária or-Rfor a remida (CRO-SP 12345,CRO-SP-TPD 1234,CRO-SP 12345-IS). Up to 2.4.0 this form was rejected. -
"CRP": a 2-digit regional code (01to24) plus 4 to 6 digits (06/12345);stateCodeis ignored. The CFP system has 24 regionals; the CRP-25 (Amapá) is only a proposal. -
"CRC": UF, 6 digits, tipo de registro (OorP) and check digit (SP-123456/O-3); a transfer appendsTorSand the destination UF (SP-123456/O-3 T-MG).stateCodematches the originating UF. This shape and theP/Sregistrations come from the Manual de Registro of 2009; Resolução CFC nº 1.707/2023, in force, only sets a numbering "única e sequencial em cada CRC" and theTof the transfer, and the check digit algorithm is not published. -
The digit counts of the OAB, CRM, CRO and CRP numbers are conventional: the OAB and the CFM publish no format, and neither the CFO's art. 115 nor the CFP fixes a digit count. CREA is not covered.
import { isValidRegistroProfissional } from '@brazilian-utils/brazilian-utils';
isValidRegistroProfissional({ value: '123456/SP', council: 'OAB' }); // true
isValidRegistroProfissional({ value: '123456-RJ', council: 'OAB', stateCode: 'SP' }); // false (UF mismatch)
isValidRegistroProfissional({ value: '123456', council: 'OAB' }); // false (no UF)
isValidRegistroProfissional({ value: '12@3456/SP', council: 'OAB' }); // false (a character outside the mask)
isValidRegistroProfissional({ value: 'CRO-SP-TPD 1234', council: 'CRO' }); // true (art. 115 of the CFO norms)
isValidRegistroProfissional({ value: '06/12345', council: 'CRP' }); // true
isValidRegistroProfissional({ value: 'SP-123456/O-3', council: 'CRC' }); // true
isValidRegistroProfissional({ value: 'SP-123456/O-3 T-MG', council: 'CRC' }); // true (registro transferido)
isValidRegistroProfissional({ value: 'SP-123456/T-3', council: 'CRC' }); // false ("T" is not a tipo de registro)Source: Consolidação das Normas do CFO, art. 115, Manual de Registro do Sistema CFC/CRCs, Resolução CFC nº 1.707/2023, CFP regional councils.
Code: brazilian-utils/javascriptTry it with JavaScript isValidRegistroProfissional
Shared test cases (76) and the result in each library registroProfissional.isValid
Official sources
- cfc.org.br/wp-content/uploads/…/1_manual_registro.pdf
- www1.cfc.org.br/sisweb/SRE/…/Res_1707.pdf
- site.cfp.org.br/cfp/sistema-conselhos/…/conselhos-pelo-brasil
- oab.org.br/util/print
- planalto.gov.br/ccivil_03/decreto/…/d44045.htm
- transparencia.cfo.org.br/wp-content/uploads/…/Consolidação-das-Normas-Atualizado-emsetembro-de-2023.pdf
- transparencia.cfp.org.br/wp-content/uploads/…/Classificacao-de-Portes-dos-CRPs-2026.csv
Last updated on
