sources / fontes
EN: official source for each entity’s rule, and whether it was actually read and checked against the code. PT: fonte oficial da regra de cada entidade, e se foi lida e conferida c/ o código de verdade.
EN: checked on 2026-09-19. Local copies of the PDFs live outside the repo, in ../Fontes oficiais/.
PT: conferido em 19/09/2026. As cópias locais dos PDFs ficam fora do repo, em ../Fontes oficiais/.
| entity | source / fonte | read and checked? / lida e conferida? | status |
|---|---|---|---|
BR_CPF |
Receita, CPF | no / não: EN: Receita pages don’t publish the calculation, algorithm is the long-standing public one / PT: páginas da Receita não publicam o cálculo, algoritmo é o público de sempre | beta |
BR_CNPJ |
Receita, FAQ CNPJ alfanumérico (PDF), Serpro, cálculo do DV (PDF) | yes / sim: ASCII - 48, weights 2..9 right to left, mod 11, example 12.ABC.345/01DE-35 matches / exemplo bate | beta |
BR_CNJ |
CNJ, Res. 65/2008 compilada, Anexo VIII | yes / sim: EN: annex formula DD = 98 - (N AAAA J TR OOOO 00 mod 97), check mod 97 == 1, J 1..9 / PT: fórmula do anexo idêntica ao código | beta |
BR_CNM |
CNJ, Provimento 143/2023, art. 1 (PDF) | yes / sim: CCCCCC.L.NNNNNNN-DD, “Módulo 97 Base 10, ISO 7064:2003” | beta |
BR_CNS |
Anvisa RNI, Validação CNS (MS algorithm in annex / algoritmo do MS em anexo) | yes / sim: EN: official Java routine ported line by line, official example 898 0000 0004 3208 matches. Found and FIXED a bug: definitive cards (1/2) must be pis + 000/001 + dv / PT: rotina Java oficial portada linha a linha, exemplo oficial bate. Achei e CORRIGI um bug: cartão definitivo (1/2) tem q ser pis + 000/001 + dv | beta |
BR_CIB |
Receita, Identificador do Cafir/CIB, Receita, CIB | yes / sim: EN: Crockford base 32; numeric: weights 8..2 mod 11; alphanumeric: weights 4,3,9,5,7,1,8 mod 31; official example A3N8Z4F-Y matches / PT: exemplo oficial bate | beta |
BR_RENAVAM |
Denatran, Portaria 27/2013 (PDF) | yes / sim: “11 dígitos… módulo 11, peso 9” | beta |
BR_TITULO_ELEITOR |
TSE, Res. 23.659/2021, art. 36 | partial / parcial: EN: layout, state table 01..28 and “Módulo 11” confirmed; weights and SP/MG rule not in the text / PT: layout, tabela de UF e “Módulo 11” confirmados; pesos e regra SP/MG não estão no texto | beta |
BR_PLACA |
Contran, Res. 969/2022 (PDF) | partial / parcial: EN: “AAA-1111” and “2nd numeric char swapped” confirmed, Annex II table is an image / PT: confirmado, tabela do Anexo II é imagem | beta |
BR_NIS |
EN: none found: Caixa, eSocial (rules only validate against the CNIS database), Serpro, open data / PT: nenhuma: Caixa, eSocial (regras só validam na base do CNIS), Serpro, dados abertos | no / não | experimental |
BR_CNH |
Contran, Res. 511/2014, art. 2, I | partial / parcial: EN: layout 9 chars + 2 check digits confirmed, weights not published (Senatran, Serpro Datavalid checked) / PT: layout 9 + 2 DVs confirmado, pesos não publicados | experimental |
BR_PIX_EVP |
BCB, Pix | EN: UUID, RFC 4122 | beta |
BR_TELEFONE |
Anatel, numeração | EN: area code list / PT: lista de DDD | beta |
BR_CEP |
Correios | EN: format only / PT: só formato | beta |
BR_IPTU |
CTN, art. 32 | EN: no national format / PT: sem formato nacional | experimental |
BR_MATRICULA_IMOVEL |
Lei 6.015/1973, art. 176 | EN: plain sequence, no DV / PT: sequencial, sem DV | experimental |
BR_CARTAO |
ISO/IEC 7812-1:2017, Mastercard account range table | EN: Luhn mod 10, plus a registered issuer prefix. The international ranges are published by the networks. Elo and Hipercard do NOT publish theirs: they go to acquirers under contract, so those entries are a narrow filter and a miss is preferred to a wrong positive. brand() is not authoritative and must never route a payment. / PT: Luhn mod 10, mais prefixo de emissor registrado. As faixas internacionais são publicadas pelas bandeiras. Elo e Hipercard NÃO publicam as suas, vão p/ as adquirentes sob contrato, então ali a tabela é filtro estreito e prefere errar p/ menos. O brand() não é autoritativo e nunca roteia pagamento. |
beta |
EN: rule: no official source found = experimental. Only a “yes” row can ever go stable.
PT: regra: sem fonte oficial = experimental. Só linha c/ “sim” pode virar stable.