{
  "$schema": "../cases.schema.json",
  "format": 1,
  "domain": "registroProfissional",
  "title": {
    "en": "Professional registration",
    "pt-BR": "Registro profissional"
  },
  "functions": [
    {
      "id": "registroProfissional.isValid",
      "level": "extended",
      "summary": "Checks the structure of a professional council registration number (registro/inscrição profissional).",
      "description": "Checks the structure of a professional council registration number: digit count and UF only, never a check digit.\n\n- `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).\n- 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).\n- 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.\n- 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.\n- 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.\n- 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.\n- 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.\n- `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`.\n- 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`.\n- The function never computes a check digit, not even for CRC, whose shape carries one (only its presence and shape are checked).",
      "params": [
        {
          "name": "params",
          "type": "IsValidRegistroProfissionalParams"
        }
      ],
      "returns": "boolean",
      "cases": [
        {
          "id": "registroProfissional.isValid#[{\"value\":\"\",\"council\":\"OAB\"}]",
          "args": [
            {
              "value": "",
              "council": "OAB"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when value is an empty string"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"123456\",\"council\":\"OAB\"}]",
          "args": [
            {
              "value": "123456",
              "council": "OAB"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when an OAB number has no UF"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"1234567/SP\",\"council\":\"OAB\"}]",
          "args": [
            {
              "value": "1234567/SP",
              "council": "OAB"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when an OAB number has too many digits"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"123456/ZZ\",\"council\":\"OAB\"}]",
          "args": [
            {
              "value": "123456/ZZ",
              "council": "OAB"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when the UF is not a real Brazilian state code"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"123456-RJ\",\"council\":\"OAB\",\"stateCode\":\"SP\"}]",
          "args": [
            {
              "value": "123456-RJ",
              "council": "OAB",
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when the UF does not match params.stateCode"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"SP/12345\",\"council\":\"CRP\"}]",
          "args": [
            {
              "value": "SP/12345",
              "council": "CRP"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when a CRP number has letters instead of the regional code"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"SP-123456-3\",\"council\":\"CRC\"}]",
          "args": [
            {
              "value": "SP-123456-3",
              "council": "CRC"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when a CRC number is missing the category letter"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"SP-123456/O\",\"council\":\"CRC\"}]",
          "args": [
            {
              "value": "SP-123456/O",
              "council": "CRC"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when a CRC number is missing the check digit"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"SP-12345/O-3\",\"council\":\"CRC\"}]",
          "args": [
            {
              "value": "SP-12345/O-3",
              "council": "CRC"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when a CRC number of ordem has 5 digits instead of the 6 of the Manual de Registro"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"SP-123456/X-3\",\"council\":\"CRC\"}]",
          "args": [
            {
              "value": "SP-123456/X-3",
              "council": "CRC"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when a CRC number carries a letter that is not a tipo de registro"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"SP-123456/T-3\",\"council\":\"CRC\"}]",
          "args": [
            {
              "value": "SP-123456/T-3",
              "council": "CRC"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when a CRC number puts \"T\" in the tipo de registro slot, which the Manual de Registro restricts to O and P"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"SP-123456/S-3\",\"council\":\"CRC\"}]",
          "args": [
            {
              "value": "SP-123456/S-3",
              "council": "CRC"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when a CRC number puts \"S\" in the tipo de registro slot"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"SP-123456/O-3 T-ZZ\",\"council\":\"CRC\"}]",
          "args": [
            {
              "value": "SP-123456/O-3 T-ZZ",
              "council": "CRC"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when the destination UF of a transferred CRC number is not a real Brazilian state code"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"SP-123456/O-3 T\",\"council\":\"CRC\"}]",
          "args": [
            {
              "value": "SP-123456/O-3 T",
              "council": "CRC"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when a transferred CRC number carries no destination UF at all"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"00/12345\",\"council\":\"CRP\"}]",
          "args": [
            {
              "value": "00/12345",
              "council": "CRP"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when a CRP regional code is 00, below the CRP-01 of the CFP system"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"25/12345\",\"council\":\"CRP\"}]",
          "args": [
            {
              "value": "25/12345",
              "council": "CRP"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when a CRP regional code is 25, above the CRP-24 of the CFP system"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"99/12345\",\"council\":\"CRP\"}]",
          "args": [
            {
              "value": "99/12345",
              "council": "CRP"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when a CRP regional code is 99, which no Conselho Regional carries"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"123456/SP\",\"council\":\"OAB\"}]",
          "args": [
            {
              "value": "123456/SP",
              "council": "OAB"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for a valid OAB number"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"123456-SP\",\"council\":\"OAB\",\"stateCode\":\"SP\"}]",
          "args": [
            {
              "value": "123456-SP",
              "council": "OAB",
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for a valid OAB number matching params.stateCode"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"54321/RJ\",\"council\":\"CRM\"}]",
          "args": [
            {
              "value": "54321/RJ",
              "council": "CRM"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for a valid CRM number"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"12345/MG\",\"council\":\"CRO\"}]",
          "args": [
            {
              "value": "12345/MG",
              "council": "CRO"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for a valid CRO number"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"06/12345\",\"council\":\"CRP\",\"stateCode\":\"SP\"}]",
          "args": [
            {
              "value": "06/12345",
              "council": "CRP",
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for a valid CRP number, ignoring params.stateCode"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"01/12345\",\"council\":\"CRP\"}]",
          "args": [
            {
              "value": "01/12345",
              "council": "CRP"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for the first regional code of the CFP system, CRP-01"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"24/12345\",\"council\":\"CRP\"}]",
          "args": [
            {
              "value": "24/12345",
              "council": "CRP"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for the last regional code of the CFP system, CRP-24"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"2412345\",\"council\":\"CRP\"}]",
          "args": [
            {
              "value": "2412345",
              "council": "CRP"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for the last regional code of the CFP system, CRP-24, written without a separator"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"SP-123456/O-3\",\"council\":\"CRC\"}]",
          "args": [
            {
              "value": "SP-123456/O-3",
              "council": "CRC"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for a valid CRC number of a registro originário"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"DF-000001/P-7\",\"council\":\"CRC\"}]",
          "args": [
            {
              "value": "DF-000001/P-7",
              "council": "CRC"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for DF-000001/P-7, the Manual de Registro's own example of a registro provisório"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"DF-000002/O-5\",\"council\":\"CRC\"}]",
          "args": [
            {
              "value": "DF-000002/O-5",
              "council": "CRC"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for DF-000002/O-5, the Manual de Registro's own example of a registro originário"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"SP-123456/O-3 T-MG\",\"council\":\"CRC\"}]",
          "args": [
            {
              "value": "SP-123456/O-3 T-MG",
              "council": "CRC"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for \"SP-123456/O-3 T-MG\", the Manual de Registro's own example of a registro definitivo transferido"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"TO-654321/P-8 T-SC\",\"council\":\"CRC\"}]",
          "args": [
            {
              "value": "TO-654321/P-8 T-SC",
              "council": "CRC"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for \"TO-654321/P-8 T-SC\", the Manual de Registro's own example of a registro provisório transferido"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"PI-111222/O-5 S-AC\",\"council\":\"CRC\"}]",
          "args": [
            {
              "value": "PI-111222/O-5 S-AC",
              "council": "CRC"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for \"PI-111222/O-5 S-AC\", the Manual de Registro's own example of a registro secundário"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"SP-123456/O-3 T-MG\",\"council\":\"CRC\",\"stateCode\":\"SP\"}]",
          "args": [
            {
              "value": "SP-123456/O-3 T-MG",
              "council": "CRC",
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for a transferred CRC number matching params.stateCode, which is the originating UF"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"SP-123456/O-3 T-MG\",\"council\":\"CRC\",\"stateCode\":\"MG\"}]",
          "args": [
            {
              "value": "SP-123456/O-3 T-MG",
              "council": "CRC",
              "stateCode": "MG"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when params.stateCode is the destination UF of a transferred CRC number, since the state matches the originating UF"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"CRO-SP 12345\",\"council\":\"CRO\",\"stateCode\":\"SP\"}]",
          "args": [
            {
              "value": "CRO-SP 12345",
              "council": "CRO",
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "changed in 2.5.0 (#593): 2.4.0 rejected the art. 115 form. JavaScript's own test: should return true for a CRO number in the form of the Consolidação das Normas do CFO, art. 115, § 1º"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"CRO-SP-TPD 1234\",\"council\":\"CRO\",\"stateCode\":\"SP\"}]",
          "args": [
            {
              "value": "CRO-SP-TPD 1234",
              "council": "CRO",
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for a CRO number in the form of the Consolidação das Normas do CFO, art. 115, § 1º"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"CRO-SP-TSB 1234\",\"council\":\"CRO\",\"stateCode\":\"SP\"}]",
          "args": [
            {
              "value": "CRO-SP-TSB 1234",
              "council": "CRO",
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for a CRO number in the form of the Consolidação das Normas do CFO, art. 115, § 1º"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"CRO-SP-ASB 1234\",\"council\":\"CRO\",\"stateCode\":\"SP\"}]",
          "args": [
            {
              "value": "CRO-SP-ASB 1234",
              "council": "CRO",
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for a CRO number in the form of the Consolidação das Normas do CFO, art. 115, § 1º"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"CRO-SP-APD 1234\",\"council\":\"CRO\",\"stateCode\":\"SP\"}]",
          "args": [
            {
              "value": "CRO-SP-APD 1234",
              "council": "CRO",
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for a CRO number in the form of the Consolidação das Normas do CFO, art. 115, § 1º"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"CRO-SP-CLM 1234\",\"council\":\"CRO\",\"stateCode\":\"SP\"}]",
          "args": [
            {
              "value": "CRO-SP-CLM 1234",
              "council": "CRO",
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for a CRO number in the form of the Consolidação das Normas do CFO, art. 115, § 1º"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"CRO-SP-CLF 1234\",\"council\":\"CRO\",\"stateCode\":\"SP\"}]",
          "args": [
            {
              "value": "CRO-SP-CLF 1234",
              "council": "CRO",
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for a CRO number in the form of the Consolidação das Normas do CFO, art. 115, § 1º"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"CRO-SP-LPM 1234\",\"council\":\"CRO\",\"stateCode\":\"SP\"}]",
          "args": [
            {
              "value": "CRO-SP-LPM 1234",
              "council": "CRO",
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for a CRO number in the form of the Consolidação das Normas do CFO, art. 115, § 1º"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"CRO-SP-LPF 1234\",\"council\":\"CRO\",\"stateCode\":\"SP\"}]",
          "args": [
            {
              "value": "CRO-SP-LPF 1234",
              "council": "CRO",
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for a CRO number in the form of the Consolidação das Normas do CFO, art. 115, § 1º"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"CRO-SP-PV 1234\",\"council\":\"CRO\",\"stateCode\":\"SP\"}]",
          "args": [
            {
              "value": "CRO-SP-PV 1234",
              "council": "CRO",
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for a CRO number in the form of the Consolidação das Normas do CFO, art. 115, § 1º"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"CRO-SP-T 1234\",\"council\":\"CRO\",\"stateCode\":\"SP\"}]",
          "args": [
            {
              "value": "CRO-SP-T 1234",
              "council": "CRO",
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for a CRO number in the form of the Consolidação das Normas do CFO, art. 115, § 1º"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"CRO-SP 12345-IS\",\"council\":\"CRO\",\"stateCode\":\"SP\"}]",
          "args": [
            {
              "value": "CRO-SP 12345-IS",
              "council": "CRO",
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for a CRO number in the form of the Consolidação das Normas do CFO, art. 115, § 1º"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"CRO-SP-TSB 1234-IS\",\"council\":\"CRO\",\"stateCode\":\"SP\"}]",
          "args": [
            {
              "value": "CRO-SP-TSB 1234-IS",
              "council": "CRO",
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for a CRO number in the form of the Consolidação das Normas do CFO, art. 115, § 1º"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"CRO-SP 12345-R\",\"council\":\"CRO\",\"stateCode\":\"SP\"}]",
          "args": [
            {
              "value": "CRO-SP 12345-R",
              "council": "CRO",
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for a CRO number in the form of the Consolidação das Normas do CFO, art. 115, § 1º"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"CRO-SP-TPD 1234-R\",\"council\":\"CRO\",\"stateCode\":\"SP\"}]",
          "args": [
            {
              "value": "CRO-SP-TPD 1234-R",
              "council": "CRO",
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for a CRO number in the form of the Consolidação das Normas do CFO, art. 115, § 1º"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"CRO-XX 12345\",\"council\":\"CRO\"}]",
          "args": [
            {
              "value": "CRO-XX 12345",
              "council": "CRO"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false for a CRO number of art. 115 whose sigla, category or suffix is not one it lists"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"CRO-SP-ABC 1234\",\"council\":\"CRO\"}]",
          "args": [
            {
              "value": "CRO-SP-ABC 1234",
              "council": "CRO"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false for a CRO number of art. 115 whose sigla, category or suffix is not one it lists"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"CRO-SP-PV 1234-IS\",\"council\":\"CRO\"}]",
          "args": [
            {
              "value": "CRO-SP-PV 1234-IS",
              "council": "CRO"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false for a CRO number of art. 115 whose sigla, category or suffix is not one it lists"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"CRO-SP-TSB 1234-R\",\"council\":\"CRO\"}]",
          "args": [
            {
              "value": "CRO-SP-TSB 1234-R",
              "council": "CRO"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false for a CRO number of art. 115 whose sigla, category or suffix is not one it lists"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"CRO-SP-CLM 1234-R\",\"council\":\"CRO\"}]",
          "args": [
            {
              "value": "CRO-SP-CLM 1234-R",
              "council": "CRO"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false for a CRO number of art. 115 whose sigla, category or suffix is not one it lists"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"CRO 12345\",\"council\":\"CRO\"}]",
          "args": [
            {
              "value": "CRO 12345",
              "council": "CRO"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false for a CRO number of art. 115 whose sigla, category or suffix is not one it lists"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"CRM-SP 12345\",\"council\":\"CRO\"}]",
          "args": [
            {
              "value": "CRM-SP 12345",
              "council": "CRO"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false for a CRO number of art. 115 whose sigla, category or suffix is not one it lists"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"CRO-RJ 12345\",\"council\":\"CRO\",\"stateCode\":\"SP\"}]",
          "args": [
            {
              "value": "CRO-RJ 12345",
              "council": "CRO",
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false for a CRO number of art. 115 whose sigla, category or suffix is not one it lists (the sigla's UF must match params.stateCode)"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"CRO-SP-TPD 1234-IS\",\"council\":\"CRO\"}]",
          "args": [
            {
              "value": "CRO-SP-TPD 1234-IS",
              "council": "CRO"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "CFO art. 115: inscrição secundária of a TPD"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"CRO-SP 12\",\"council\":\"CRO\"}]",
          "args": [
            {
              "value": "CRO-SP 12",
              "council": "CRO"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "fewer than 3 digits"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"12345/SP\",\"council\":\"CRO\",\"stateCode\":\"sp\"}]",
          "args": [
            {
              "value": "12345/SP",
              "council": "CRO",
              "stateCode": "sp"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "changed in 2.5.0 (#604): the state code is read without regard to case; 2.4.0 returned false"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"12345/SP\",\"council\":\"CRO\",\"stateCode\":\" sp \"}]",
          "args": [
            {
              "value": "12345/SP",
              "council": "CRO",
              "stateCode": " sp "
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "changed in 2.5.0 (#604): the state code is trimmed and read without regard to case; 2.4.0 returned false"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"12@3456/SP\",\"council\":\"OAB\"}]",
          "args": [
            {
              "value": "12@3456/SP",
              "council": "OAB"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "changed in 2.5.0 (#615): a character outside the mask (whitespace, `.`, `-`, `/`) makes the value invalid; it used to be stripped. JavaScript docs example"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"123456/S@P\",\"council\":\"OAB\"}]",
          "args": [
            {
              "value": "123456/S@P",
              "council": "OAB"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "changed in 2.5.0 (#615): a character outside the mask makes the value invalid; it used to be stripped"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"12345/SP😀\",\"council\":\"CRM\"}]",
          "args": [
            {
              "value": "12345/SP😀",
              "council": "CRM"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "changed in 2.5.0 (#615): a character outside the mask makes the value invalid; it used to be stripped"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"06/12@345\",\"council\":\"CRP\"}]",
          "args": [
            {
              "value": "06/12@345",
              "council": "CRP"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "changed in 2.5.0 (#615): a character outside the mask makes the value invalid; it used to be stripped"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"SP-123456/O-3!\",\"council\":\"CRC\"}]",
          "args": [
            {
              "value": "SP-123456/O-3!",
              "council": "CRC"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "changed in 2.5.0 (#615): a character outside the mask makes the value invalid; it used to be stripped"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"CRO-SP@ 12345\",\"council\":\"CRO\"}]",
          "args": [
            {
              "value": "CRO-SP@ 12345",
              "council": "CRO"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "a character outside the mask makes the value invalid (the art. 115 form did not exist in 2.4.0, which rejected this value anyway)"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"123.456-SP\",\"council\":\"OAB\"}]",
          "args": [
            {
              "value": "123.456-SP",
              "council": "OAB"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "the mask characters `.` and `-` are ignored wherever they sit"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\" 123456 / SP \",\"council\":\"OAB\"}]",
          "args": [
            {
              "value": " 123456 / SP ",
              "council": "OAB"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "whitespace and `/` are mask characters"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"123456/SP\",\"council\":\"OAB\",\"stateCode\":\"SP\"}]",
          "args": [
            {
              "value": "123456/SP",
              "council": "OAB",
              "stateCode": "SP"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript docs example: expected UF equal to the number's UF"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"123456/sp\",\"council\":\"OAB\",\"stateCode\":\"sp\"}]",
          "args": [
            {
              "value": "123456/sp",
              "council": "OAB",
              "stateCode": "sp"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "stateCode is read without regard to case"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"06/12345\",\"council\":\"CRP\",\"stateCode\":\"RJ\"}]",
          "args": [
            {
              "value": "06/12345",
              "council": "CRP",
              "stateCode": "RJ"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "stateCode is ignored for CRP"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"CRO-SP-TPD 1234\",\"council\":\"CRO\"}]",
          "args": [
            {
              "value": "CRO-SP-TPD 1234",
              "council": "CRO"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript docs example: art. 115 of the CFO norms"
        },
        {
          "id": "registroProfissional.isValid#[null]",
          "args": [
            null
          ],
          "expect": {
            "returns": false
          },
          "note": "a params that is not an object returns false"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":123456,\"council\":\"OAB\"}]",
          "args": [
            {
              "value": 123456,
              "council": "OAB"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "a value that is not a string returns false"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"123456/SP\",\"council\":\"CREA\"}]",
          "args": [
            {
              "value": "123456/SP",
              "council": "CREA"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "CREA is not supported"
        },
        {
          "id": "registroProfissional.isValid#[{\"value\":\"123456/SP\"}]",
          "args": [
            {
              "value": "123456/SP"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "a params without council returns false"
        }
      ]
    }
  ]
}
