Professional registration

Registration numbers of professional councils (OAB, CRM, CRO, CRP, CRC).

  • Parity matrix

Validate

Checks the structure of a professional council registration number: digit count and UF only, never a check digit.

  • params contains 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/sp is 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 -IS for an inscrição secundária or -R for 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 TPD may carry -R. TSB, ASB and APD may carry -IS only, 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 (01 to 24) 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 (O or P) and a check digit (SP-123456/O-3); a transfer appends T or S and 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 P and S registrations 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 the T of 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 a 300 prefix (physicians trained abroad) or a trailing P (provisional inscription), and an OAB number with 7 digits.
  • params.value is the registration number, params.council is OAB, CRM, CRO, CRP or CRC, and params.stateCode is the optional expected UF. A params that is not an object, or one without a string value or a known council, returns false.
  • 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/SP is false). Until 2.4.0 such characters were stripped, so 12@3456/SP was true.
  • The function never computes a check digit, not even for CRC, whose shape carries one (only its presence and shape are checked).
ParameterTypeRequired
paramsIsValidRegistroProfissionalParamsyes
params.valuestringyes
params.councilRegistroProfissionalCouncilyes
params.stateCodeStateCodeno
returnsboolean

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", a RegistroProfissionalCouncil) and an optional stateCode (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 -IS for a secundária or -R for 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 (01 to 24) plus 4 to 6 digits (06/12345); stateCode is ignored. The CFP system has 24 regionals; the CRP-25 (Amapá) is only a proposal.

  • "CRC": UF, 6 digits, tipo de registro (O or P) and check digit (SP-123456/O-3); a transfer appends T or S and the destination UF (SP-123456/O-3 T-MG). stateCode matches the originating UF. This shape and the P/S registrations 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 the T of 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/javascript
Try it with JavaScript isValidRegistroProfissional
The inputs start with the first shared case. Change one to see the new result.

Runs @brazilian-utils/brazilian-utils 2.5.0 in your browser.

Shared test cases (76) and the result in each library registroProfissional.isValid

Official sources

Last updated on

On this page