Ruby library
What the Ruby library implements from the shared contract, what fails, and what to do next.
- Repository
- github.com/brazilian-utils/ruby
fa705df - Package
- br-utils
Install
gem install br-utilsRuby implements 133 of the 182 contract functions and 27.5% of the core functions. 2589 shared cases pass and 1019 fail. 5 functions have a signature that does not match the contract. 8 public functions are not in the contract.
Compared with the other libraries
| Library | Core functions | Implemented | Cases that pass |
|---|---|---|---|
| JavaScript library | 100% | 180/182 | 5033 |
| Rust library | 37.5% | 132/182 | 1732 |
| Go library | 35% | 136/182 | 2081 |
| .NET library | 32.5% | 133/182 | 2194 |
| Ruby | 27.5% | 133/182 | 2589 |
| Python library | 17.5% | 40/182 | 500 |
| Erlang library | 12.5% | 29/182 | 340 |
What to do next
The list starts with failing functions, then wrong signatures, then missing core functions, then the rest. In each group, functions implemented by more libraries come first, since there is more code to port from. Each item is also an issue in the library's repository.
103 functions fail
Show the 103 failing functions
| Function | Status | Details | Implemented by |
|---|---|---|---|
CEP: Formatcep.format (core) | fails | 13 cases fail | 6: JavaScript, Python, Go, Rust, .NET, Erlang |
CEP: Validatecep.isValid (core) | fails | 10 cases fail | 6: JavaScript, Python, Go, Rust, .NET, Erlang |
Driver's license (CNH): Validatecnh.isValid (core) | fails | 3 cases fail | 6: JavaScript, Python, Go, Rust, .NET, Erlang |
CNPJ: Formatcnpj.format (core) | fails | 36 cases fail | 6: JavaScript, Python, Go, Rust, .NET, Erlang |
CNPJ: Validatecnpj.isValid (core) | fails | 3 cases fail | 6: JavaScript, Python, Go, Rust, .NET, Erlang |
CPF: Formatcpf.format (core) | fails | 28 cases fail | 6: JavaScript, Python, Go, Rust, .NET, Erlang |
CPF: Validatecpf.isValid (core) | fails | 5 cases fail | 6: JavaScript, Python, Go, Rust, .NET, Erlang |
License plate: FormatlicensePlate.format (core) | fails | 15 cases fail | 6: JavaScript, Python, Go, Rust, .NET, Erlang |
License plate: GeneratelicensePlate.generate (core) | fails | 4 cases fail | 6: JavaScript, Python, Go, Rust, .NET, Erlang |
License plate: ValidatelicensePlate.isValid (core) | fails | 9 cases fail | 6: JavaScript, Python, Go, Rust, .NET, Erlang |
Phone: Formatphone.format (core) | fails | 100 cases fail | 6: JavaScript, Python, Go, Rust, .NET, Erlang |
Phone: Generatephone.generate (core) | fails | 2 cases fail | 6: JavaScript, Python, Go, Rust, .NET, Erlang |
PIS/PASEP: Formatpis.format (core) | fails | 55 cases fail | 6: JavaScript, Python, Go, Rust, .NET, Erlang |
PIS/PASEP: Validatepis.isValid (core) | fails | 5 cases fail | 6: JavaScript, Python, Go, Rust, .NET, Erlang |
RENAVAM: Validaterenavam.isValid (core) | fails | 7 cases fail | 6: JavaScript, Python, Go, Rust, .NET, Erlang |
Voter ID: FormatvoterId.format (core) | fails | 26 cases fail | 6: JavaScript, Python, Go, Rust, .NET, Erlang |
Voter ID: ValidatevoterId.isValid (core) | fails | 18 cases fail | 6: JavaScript, Python, Go, Rust, .NET, Erlang |
Currency (BRL): Write out in wordscurrency.convertToWords (core) | fails | 2 cases fail | 5: JavaScript, Python, Go, Rust, .NET |
Currency (BRL): Formatcurrency.format (core) | fails | 15 cases fail | 5: JavaScript, Python, Go, Rust, .NET |
Dates and holidays: Write out in wordsdate.convertToWords | fails | 4 cases fail | 5: JavaScript, Python, Go, Rust, .NET |
Email: Validateemail.isValid (core) | fails | 7 cases fail | 5: JavaScript, Python, Go, Rust, .NET |
Legal nature: ValidatelegalNature.isValid (core) | fails | 12 cases fail | 5: JavaScript, Python, Go, Rust, .NET |
Legal nature: ListlegalNature.list (core) | fails | 1 case fails | 5: JavaScript, Python, Go, Rust, .NET |
Court case number: FormatlegalProcess.format (core) | fails | 25 cases fail | 5: JavaScript, Python, Go, Rust, .NET |
Court case number: GeneratelegalProcess.generate (core) | fails | 2 cases fail | 5: JavaScript, Python, Go, Rust, .NET |
Court case number: ValidatelegalProcess.isValid (core) | fails | 22 cases fail | 5: JavaScript, Python, Go, Rust, .NET |
Phone: Validatephone.isValid (core) | fails | 21 cases fail | 5: JavaScript, Go, Rust, .NET, Erlang |
Banks: Get by codebank.getByCode | fails | 5 cases fail | 4: JavaScript, Go, Rust, .NET |
Banks: Get by ispbbank.getByIspb | fails | 4 cases fail | 4: JavaScript, Go, Rust, .NET |
Bank account: ValidatebankAccount.isValid | fails | 44 cases fail | 4: JavaScript, Go, Rust, .NET |
Boleto: Formatboleto.format | fails | 7 cases fail | 4: JavaScript, Go, Rust, .NET |
Boleto: Generateboleto.generate | fails | 1 case fails | 4: JavaScript, Go, Rust, .NET |
Boleto: Validateboleto.isValid (core) | fails | 35 cases fail | 4: JavaScript, Go, Rust, .NET |
Boleto: Parseboleto.parse | fails | 2 cases fail | 4: JavaScript, Go, Rust, .NET |
CAEPF: Formatcaepf.format | fails | 7 cases fail | 4: JavaScript, Go, Rust, .NET |
CAEPF: Validatecaepf.isValid | fails | 1 case fails | 4: JavaScript, Go, Rust, .NET |
CAEPF: Parsecaepf.parse | fails | 2 cases fail | 4: JavaScript, Go, Rust, .NET |
CBO: Look upcbo.get | fails | 14 cases fail | 4: JavaScript, Go, Rust, .NET |
CBO: Validatecbo.isValid | fails | 12 cases fail | 4: JavaScript, Go, Rust, .NET |
CBO: Parsecbo.parse | fails | 2 cases fail | 4: JavaScript, Go, Rust, .NET |
CEI: Formatcei.format | fails | 7 cases fail | 4: JavaScript, Go, Rust, .NET |
CEI: Validatecei.isValid | fails | 3 cases fail | 4: JavaScript, Go, Rust, .NET |
CEI: Parsecei.parse | fails | 2 cases fail | 4: JavaScript, Go, Rust, .NET |
CEP: Parsecep.parse | fails | 2 cases fail | 4: JavaScript, Go, Rust, .NET |
Civil registry certificate: Formatcertidao.format | fails | 5 cases fail | 4: JavaScript, Go, Rust, .NET |
Civil registry certificate: Decodecertidao.getInfo | fails | 5 cases fail | 4: JavaScript, Go, Rust, .NET |
Civil registry certificate: Parsecertidao.parse | fails | 2 cases fail | 4: JavaScript, Go, Rust, .NET |
CFOP: Look upcfop.get | fails | 1 case fails | 4: JavaScript, Go, Rust, .NET |
CFOP: Validatecfop.isValid | fails | 1 case fails | 4: JavaScript, Go, Rust, .NET |
CFOP: Parsecfop.parse | fails | 2 cases fail | 4: JavaScript, Go, Rust, .NET |
CNAE: Formatcnae.format | fails | 7 cases fail | 4: JavaScript, Go, Rust, .NET |
CNAE: Look upcnae.get | fails | 1 case fails | 4: JavaScript, Go, Rust, .NET |
CNAE: Validatecnae.isValid | fails | 3 cases fail | 4: JavaScript, Go, Rust, .NET |
CNAE: Parsecnae.parse | fails | 2 cases fail | 4: JavaScript, Go, Rust, .NET |
Driver's license (CNH): Formatcnh.format | fails | 11 cases fail | 4: JavaScript, Go, Rust, .NET |
Driver's license (CNH): Parsecnh.parse | fails | 2 cases fail | 4: JavaScript, Go, Rust, .NET |
CNO: Formatcno.format | fails | 7 cases fail | 4: JavaScript, Go, Rust, .NET |
CNO: Validatecno.isValid | fails | 2 cases fail | 4: JavaScript, Go, Rust, .NET |
CNO: Parsecno.parse | fails | 2 cases fail | 4: JavaScript, Go, Rust, .NET |
CNPJ: Parsecnpj.parse | fails | 3 cases fail | 4: JavaScript, Go, Rust, .NET |
CNS (SUS card): Formatcns.format | fails | 5 cases fail | 4: JavaScript, Go, Rust, .NET |
CNS (SUS card): Validatecns.isValid | fails | 4 cases fail | 4: JavaScript, Go, Rust, .NET |
CNS (SUS card): Parsecns.parse | fails | 2 cases fail | 4: JavaScript, Go, Rust, .NET |
CPF: Parsecpf.parse | fails | 2 cases fail | 4: JavaScript, Go, Rust, .NET |
Payment card: ValidatecreditCard.isValid | fails | 3 cases fail | 4: JavaScript, Go, Rust, .NET |
CST: Validatecst.isValid | fails | 32 cases fail | 4: JavaScript, Go, Rust, .NET |
Currency (BRL): Parsecurrency.parse | fails | 3 cases fail | 4: JavaScript, Go, Rust, .NET |
IBAN: Decodeiban.getInfo | fails | 1 case fails | 4: JavaScript, Go, Rust, .NET |
IBAN: Validateiban.isValid | fails | 3 cases fail | 4: JavaScript, Go, Rust, .NET |
IBAN: Parseiban.parse | fails | 2 cases fail | 4: JavaScript, Go, Rust, .NET |
Legal nature: FormatlegalNature.format | fails | 7 cases fail | 4: JavaScript, Go, Rust, .NET |
Legal nature: Look uplegalNature.get | fails | 4 cases fail | 4: JavaScript, Go, Rust, .NET |
Legal nature: List by categorylegalNature.listByCategory | fails | 2 cases fail | 4: JavaScript, Go, Rust, .NET |
Legal nature: ParselegalNature.parse | fails | 1 case fails | 4: JavaScript, Go, Rust, .NET |
Court case number: ParselegalProcess.parse | fails | 2 cases fail | 4: JavaScript, Go, Rust, .NET |
Municipalities: Get by codemunicipality.getByCode | fails | 2 cases fail | 4: JavaScript, Go, Rust, .NET |
Municipalities: Listmunicipality.list | fails | 4 cases fail | 4: JavaScript, Go, Rust, .NET |
NCM: Formatncm.format | fails | 6 cases fail | 4: JavaScript, Go, Rust, .NET |
NCM: Validatencm.isValid | fails | 1 case fails | 4: JavaScript, Go, Rust, .NET |
NCM: Parsencm.parse | fails | 2 cases fail | 4: JavaScript, Go, Rust, .NET |
NF-e access key: FormatnfeKey.format | fails | 9 cases fail | 4: JavaScript, Go, Rust, .NET |
NF-e access key: DecodenfeKey.getInfo | fails | 9 cases fail | 4: JavaScript, Go, Rust, .NET |
NF-e access key: ValidatenfeKey.isValid | fails | 12 cases fail | 4: JavaScript, Go, Rust, .NET |
NF-e access key: ParsenfeKey.parse | fails | 6 cases fail | 4: JavaScript, Go, Rust, .NET |
Phone: Is valid landlinephone.isValidLandline | fails | 4 cases fail | 4: JavaScript, Go, Rust, .NET |
Phone: Is valid mobilephone.isValidMobile | fails | 9 cases fail | 4: JavaScript, Go, Rust, .NET |
Phone: Is valid servicephone.isValidService | fails | 10 cases fail | 4: JavaScript, Go, Rust, .NET |
Phone: Parsephone.parse | fails | 5 cases fail | 4: JavaScript, Go, Rust, .NET |
PIS/PASEP: Parsepis.parse | fails | 1 case fails | 4: JavaScript, Go, Rust, .NET |
Pix key: DecodepixKey.getInfo | fails | 20 cases fail | 4: JavaScript, Go, Rust, .NET |
Pix key: ValidatepixKey.isValid | fails | 10 cases fail | 4: JavaScript, Go, Rust, .NET |
Pix payload (BR Code): DecodepixPayload.getInfo | fails | 13 cases fail | 4: JavaScript, Go, Rust, .NET |
Pix payload (BR Code): ValidatepixPayload.isValid | fails | 23 cases fail | 4: JavaScript, Go, Rust, .NET |
Professional registration: ValidateregistroProfissional.isValid | fails | 22 cases fail | 4: JavaScript, Go, Rust, .NET |
Text: Capitalizetext.capitalize | fails | 79 cases fail | 4: JavaScript, Go, Rust, .NET |
Text: Remove accentstext.removeAccents | fails | 2 cases fail | 4: JavaScript, Go, Rust, .NET |
VIN (chassis): Validatevin.isValid | fails | 3 cases fail | 4: JavaScript, Go, Rust, .NET |
Voter ID: ParsevoterId.parse | fails | 4 cases fail | 4: JavaScript, Go, Rust, .NET |
Area code (DDD): DecodeareaCode.getInfo | fails | 2 cases fail | 3: JavaScript, Go, .NET |
Civil registry certificate: Validatecertidao.isValid | fails | 4 cases fail | 3: JavaScript, Go, Rust |
Pix payload (BR Code): GeneratepixPayload.generate | fails | 17 cases fail | 3: JavaScript, Go, Rust |
States (UF): Get by ibge codestate.getByIbgeCode | fails | 1 case fails | 3: JavaScript, Go, .NET |
Boleto: Decodeboleto.getInfo | fails | 10 cases fail | 2: JavaScript, Go |
5 functions have a different signature
| Function | Status | Details | Implemented by |
|---|---|---|---|
CEP: Get info by addresscep.getInfoByAddress (core) | wrong signature | parameter "params": expects GetCepInfoByAddressParams, lib takes string | 4: JavaScript, Go, Rust, .NET |
Dates and holidays: Get holidaysdate.getHolidays | wrong signature | parameter "year" (contract "options.year") is required, contract makes it optional | 4: JavaScript, Go, Rust, .NET |
State registration (IE): Validateie.isValid | wrong signature | parameter "value" (contract "params.value") is required, contract makes it optional. parameter "state" (contract "params.stateCode") is required, contract makes it optional | 4: JavaScript, Go, Rust, .NET |
Dates and holidays: Add business daysdate.addBusinessDays | wrong signature | parameter "amount": expects number, lib takes integer | 1: JavaScript |
Dates and holidays: Sub business daysdate.subBusinessDays | wrong signature | parameter "amount": expects number, lib takes integer | 1: JavaScript |
44 functions are missing
Show the 44 missing functions
| Function | Status | Implemented by |
|---|---|---|
Municipalities: Get code by namemunicipality.getCodeByName (core) | missing | 1: JavaScript |
Area code (DDD): Get by municipality codeareaCode.getByMunicipalityCode | missing | 1: JavaScript |
CBO: Formatcbo.format | missing | 1: JavaScript |
CEP: Get statecep.getState | missing | 1: JavaScript |
CEST: Formatcest.format | missing | 1: JavaScript |
CEST: Look upcest.get | missing | 1: JavaScript |
CEST: Validatecest.isValid | missing | 1: JavaScript |
CEST: Parsecest.parse | missing | 1: JavaScript |
CFOP: Formatcfop.format | missing | 1: JavaScript |
CID-10: Formatcid10.format | missing | 1: JavaScript |
CID-10: Look upcid10.get | missing | 1: JavaScript |
CID-10: Validatecid10.isValid | missing | 1: JavaScript |
CID-10: Parsecid10.parse | missing | 1: JavaScript |
cClassTrib: Look upclassTrib.get | missing | 1: JavaScript |
cClassTrib: ValidateclassTrib.isValid | missing | 1: JavaScript |
CNPJ: Decodecnpj.getInfo | missing | 1: JavaScript |
CPF: Decodecpf.getInfo | missing | 1: JavaScript |
CST IBS/CBS: Look upcstIbsCbs.get | missing | 1: JavaScript |
CST IBS/CBS: ValidatecstIbsCbs.isValid | missing | 1: JavaScript |
GTIN (EAN/UPC): Decodegtin.getInfo | missing | 1: JavaScript |
GTIN (EAN/UPC): Validategtin.isValid | missing | 1: JavaScript |
ISBN: Formatisbn.format | missing | 1: JavaScript |
ISBN: Decodeisbn.getInfo | missing | 1: JavaScript |
ISBN: Validateisbn.isValid | missing | 1: JavaScript |
ISBN: Parseisbn.parse | missing | 1: JavaScript |
Court case number: DecodelegalProcess.getInfo | missing | 1: JavaScript |
Municipalities: List by area codemunicipality.listByAreaCode | missing | 1: JavaScript |
NBS: Formatnbs.format | missing | 1: JavaScript |
NBS: Look upnbs.get | missing | 1: JavaScript |
NBS: Validatenbs.isValid | missing | 1: JavaScript |
NBS: Parsenbs.parse | missing | 1: JavaScript |
NFS-e access key: DecodenfseKey.getInfo | missing | 1: JavaScript |
NFS-e access key: ValidatenfseKey.isValid | missing | 1: JavaScript |
NFS-e access key: ParsenfseKey.parse | missing | 1: JavaScript |
Service list (LC 116): Look upserviceItem.get | missing | 1: JavaScript |
Service list (LC 116): ValidateserviceItem.isValid | missing | 1: JavaScript |
States (UF): Get capitalstate.getCapital | missing | 1: JavaScript |
States (UF): Get regionsstate.getRegions | missing | 1: JavaScript |
States (UF): List by regionstate.listByRegion | missing | 1: JavaScript |
SUFRAMA registration: Formatsuframa.format | missing | 1: JavaScript |
SUFRAMA registration: Generatesuframa.generate | missing | 1: JavaScript |
SUFRAMA registration: Validatesuframa.isValid | missing | 1: JavaScript |
SUFRAMA registration: Parsesuframa.parse | missing | 1: JavaScript |
Voter ID: DecodevoterId.getInfo | missing | 1: JavaScript |
Failing cases
Show the 1019 failing cases
| Case | Expected | Actual |
|---|---|---|
areaCode.getInfo#["(0xx11)"] | {"areaCode":11,"stateCode":"SP","stateName":"São Paulo","regionCode":"SE","regionName":"Sudeste","stateCodes":["SP"]} | expected {"areaCode":11,"stateCode":"SP","stateName":"São Paulo","regionCode":"SE","regionName":"Sudeste","stateCodes":["SP"]}, got null |
areaCode.getInfo#["DDD 11"] | {"areaCode":11,"stateCode":"SP","stateName":"São Paulo","regionCode":"SE","regionName":"Sudeste","stateCodes":["SP"]} | expected {"areaCode":11,"stateCode":"SP","stateName":"São Paulo","regionCode":"SE","regionName":"Sudeste","stateCodes":["SP"]}, got null |
bank.getByCode#["0-01"] | {"code":"001","ispb":"00000000","name":"Banco do Brasil S.A."} | expected {"code":"001","ispb":"00000000","name":"Banco do Brasil S.A."}, got null |
bank.getByCode#["341/"] | {"code":"341","ispb":"60701190","name":"ITAÚ UNIBANCO S.A."} | expected {"code":"341","ispb":"60701190","name":"ITAÚ UNIBANCO S.A."}, got null |
bank.getByCode#["0x1"] | {"code":"001","ispb":"00000000","name":"Banco do Brasil S.A."} | expected {"code":"001","ispb":"00000000","name":"Banco do Brasil S.A."}, got null |
bank.getByCode#["516"] | {"code":"516","ispb":"36583700","name":"PLACARPAY S.A. - SOCIEDADE DE CRÉDITO, FINANCIAMENTO E INVESTIMENTO"} | expected {"code":"516","ispb":"36583700","name":"PLACARPAY S.A. - SOCIEDADE DE CRÉDITO, FINANCIAMENTO E INVESTIMENTO"}, got null |
bank.getByCode#["692"] | {"code":"692","ispb":"56198117","name":"ZYDI SOCIEDADE DE CRÉDITO DIRETO S.A."} | expected {"code":"692","ispb":"56198117","name":"ZYDI SOCIEDADE DE CRÉDITO DIRETO S.A."}, got null |
bank.getByIspb#["0000-0000"] | {"code":"001","ispb":"00000000","name":"Banco do Brasil S.A."} | expected {"code":"001","ispb":"00000000","name":"Banco do Brasil S.A."}, got null |
bank.getByIspb#["00.000.000"] | {"code":"001","ispb":"00000000","name":"Banco do Brasil S.A."} | expected {"code":"001","ispb":"00000000","name":"Banco do Brasil S.A."}, got null |
bank.getByIspb#["0000/0000"] | {"code":"001","ispb":"00000000","name":"Banco do Brasil S.A."} | expected {"code":"001","ispb":"00000000","name":"Banco do Brasil S.A."}, got null |
bank.getByIspb#[" 60.701.190 "] | {"code":"341","ispb":"60701190","name":"ITAÚ UNIBANCO S.A."} | expected {"code":"341","ispb":"60701190","name":"ITAÚ UNIBANCO S.A."}, got null |
bankAccount.isValid#[{"bankCode":"001","agency":"1234","account":"12345678901","digit":"5"}] | false | true |
bankAccount.isValid#[{"bankCode":"104","agency":"1234","account":"1234567890","digit":"0"}] | false | true |
bankAccount.isValid#[{"bankCode":"246","agency":"1234","account":"123456","digit":"6"}] | true | false |
bankAccount.isValid#[{"bankCode":"246","agency":"1234","account":"123456","digit":"1"}] | true | false |
bankAccount.isValid#[{"bankCode":"246","agency":"123-4","account":"123.456-78","digit":"2"}] | true | false |
bankAccount.isValid#[{"bankCode":"001","agency":"7138","account":"00189062","digit":"0"}] | false | true |
bankAccount.isValid#[{"bankCode":"341","agency":"2545","account":"02366","digit":"1"}] | true | false |
bankAccount.isValid#[{"bankCode":"341","agency":"1874","account":"10009","digit":"0"}] | true | false |
bankAccount.isValid#[{"bankCode":"237","agency":"1234","account":"0301357","digit":"0"}] | false | true |
bankAccount.isValid#[{"bankCode":"033","agency":"0189","account":"01017417","digit":"9"}] | true | false |
bankAccount.isValid#[{"bankCode":"104","agency":"0647","account":"00188888888","digit":"7"}] | true | false |
bankAccount.isValid#[{"bankCode":"104","agency":"2004","account":"00100000448","digit":"6"}] | true | false |
bankAccount.isValid#[{"bankCode":"246","agency":"1234","account":"123456","digit":"60"}] | true | false |
bankAccount.isValid#[{"bankCode":"246","agency":"1234","account":"000016","digit":"60"}] | true | false |
bankAccount.isValid#[{"bankCode":"246","agency":"1234","account":"000014","digit":"0"}] | true | false |
bankAccount.isValid#[{"bankCode":"041","agency":"2664","account":"358507670","digit":"6"}] | true | false |
bankAccount.isValid#[{"bankCode":"041","agency":"1234","account":"358507671","digit":"0"}] | false | true |
bankAccount.isValid#[{"bankCode":"399","agency":"0007","account":"853838","digit":"6"}] | true | false |
bankAccount.isValid#[{"bankCode":"399","agency":"1996","account":"498991","digit":"4"}] | true | false |
bankAccount.isValid#[{"bankCode":"399","agency":"1913","account":"104012","digit":"0"}] | true | false |
bankAccount.isValid#[{"bankCode":"399","agency":"0000","account":"000006","digit":"0"}] | true | false |
bankAccount.isValid#[{"bankCode":"745","agency":"0001","account":"2000967610","digit":"4"}] | true | false |
bankAccount.isValid#[{"bankCode":"745","agency":"0062","account":"2574827866","digit":"9"}] | true | false |
bankAccount.isValid#[{"bankCode":"745","agency":"0075","account":"1000000000","digit":"0"}] | true | false |
bankAccount.isValid#[{"bankCode":"745","agency":"0075","account":"1000000006","digit":"0"}] | true | false |
bankAccount.isValid#[{"bankCode":"745","agency":"0075","account":"007500465","digit":"8"}] | false | true |
bankAccount.isValid#[{"bankCode":"260","agency":"0001","account":"5216125","digit":"0"}] | true | false |
bankAccount.isValid#[{"bankCode":"260","agency":"0001","account":"1699629","digit":"9"}] | true | false |
bankAccount.isValid#[{"bankCode":"260","agency":"0001","account":"96805203","digit":"6"}] | true | false |
bankAccount.isValid#[{"bankCode":"260","agency":"0001","account":"00076832060","digit":"9"}] | true | false |
bankAccount.isValid#[{"bankCode":"077","agency":"0001","account":"123456789","digit":"0"}] | true | false |
bankAccount.isValid#[{"bankCode":"336","agency":"0001","account":"1792706","digit":"4"}] | true | false |
bankAccount.isValid#[{"bankCode":"077","agency":"0001","account":"123456789","digit":"X"}] | false | true |
bankAccount.isValid#[{"bankCode":"104","agency":"1278","account":"00118939153","digit":"0"}] | true | false |
bankAccount.isValid#[{"bankCode":"033","agency":"0092","account":"46535495","digit":"0"}] | true | false |
bankAccount.isValid#[{"bankCode":"237","agency":"12345","account":"0238069","digit":"2"}] | false | true |
bankAccount.isValid#[{"bankCode":"246","agency":"12345","account":"123456","digit":"6"}] | true | false |
bankAccount.isValid#[{"bankCode":"246","agency":"1234","account":"1234567890123","digit":"7"}] | true | false |
bankAccount.isValid#[{"bankCode":"001","agency":"1584","account":"00210169","digit":"-6"}] | true | false |
bankAccount.isValid#[{"bankCode":"246","agency":"1234","account":"123457","digit":"41"}] | true | false |
bankAccount.isValid#[{"bankCode":"104","agency":"0161","account":"000000109990","digit":"5"}] | true | false |
bankAccount.isValid#[{"bankCode":"033","agency":"2001","account":"01038237","digit":"7"}] | true | false |
bankAccount.isValid#[{"bankCode":"246","agency":"1234","account":"123456","digit":"0"}] | true | false |
bankAccount.isValid#[{"bankCode":"001","agency":"1-584","account":"0021.0169","digit":"6"}] | true | false |
boleto.format#[-1] | "" | "1" |
boleto.format#[1.5] | "" | "15" |
boleto.format#[9007199254740992] | "" | "90071.99254 74099.2" |
boleto.format#[1e+21,{"pad":true}] | "" | "00000.00000 00000.000000 00000.000000 0 00000000001021" |
boleto.format#["",{"pad":true}] | "" | "00000.00000 00000.000000 00000.000000 0 00000000000000" |
boleto.format#["abc",{"pad":true}] | "" | "00000.00000 00000.000000 00000.000000 0 00000000000000" |
boleto.format#[null,{"pad":true}] | "" | "00000.00000 00000.000000 00000.000000 0 00000000000000" |
boleto.generate#[{"type":"arrecadacao"}] | null | expected /^8\d{47}$/, got null |
boleto.getInfo#["00170000010114971860168524522114275860000102656"] | null | {"bankCode":"001","amount":102656,"dueDate":"2015-10-19"} |
boleto.getInfo#["98800000060114971860168524522114100000018236120"] | {"amount":0,"expirationDate":null,"bankCode":"988","ispb":"18236120"} | {"bankCode":"988","amount":18236120,"dueDate":null} |
boleto.getInfo#["846100000005246100291102005460339004695895061080"] | {"amount":2461,"expirationDate":null,"bankCode":"","type":"arrecadacao","segment":4,"value":24.61,"hasEffectiveValue":true} | expected {"amount":2461,"expirationDate":null,"bankCode":"","type":"arrecadacao","segment":4,"value":24.61,"hasEffectiveValue":true}, got null |
boleto.getInfo#["abc00190000090114971860168524522114675860000102656zzz"] | null | {"bankCode":"001","amount":102656,"dueDate":"2015-10-19"} |
boleto.getInfo#["00191000000001026560000001149718606852452211"] | {"amount":102656,"expirationDate":null,"bankCode":"001"} | expected {"amount":102656,"expirationDate":null,"bankCode":"001"}, got null |
boleto.getInfo#["98801000000182361200000001149718606852452211"] | {"amount":0,"expirationDate":null,"bankCode":"988","ispb":"18236120"} | expected {"amount":0,"expirationDate":null,"bankCode":"988","ispb":"18236120"}, got null |
boleto.getInfo#["84610000000246100291100054603390069589506108"] | {"amount":2461,"expirationDate":null,"bankCode":"","type":"arrecadacao","segment":4,"value":24.61,"hasEffectiveValue":true} | expected {"amount":2461,"expirationDate":null,"bankCode":"","type":"arrecadacao","segment":4,"value":24.61,"hasEffectiveValue":true}, got null |
boleto.getInfo#["84610000000-5 24610029110-2 00546033900-4 69589506108-0"] | {"amount":2461,"expirationDate":null,"bankCode":"","type":"arrecadacao","segment":4,"value":24.61,"hasEffectiveValue":true} | expected {"amount":2461,"expirationDate":null,"bankCode":"","type":"arrecadacao","segment":4,"value":24.61,"hasEffectiveValue":true}, got null |
boleto.getInfo#["847900000005246100291102005460339004695895061080"] | {"amount":2461,"expirationDate":null,"bankCode":"","type":"arrecadacao","segment":4,"value":24.61,"hasEffectiveValue":false} | expected {"amount":2461,"expirationDate":null,"bankCode":"","type":"arrecadacao","segment":4,"value":24.61,"hasEffectiveValue":false}, got null |
boleto.getInfo#[123] | null | expected null, threw: NoMethodError: undefined method `gsub' for an instance of Integer |
boleto.isValid#["60757135008571297205909229083648919190488862573"] | false | true |
boleto.isValid#["52410567606343146479903680440595729289409535291"] | false | true |
boleto.isValid#["74348924801607065591119728853342723148482264669"] | false | true |
boleto.isValid#["60757.13500 85712.972059 09229.083648 9 19190488862573"] | false | true |
boleto.isValid#["52410.56760 63431.464799 03680.440595 7 29289409535291"] | false | true |
boleto.isValid#["74348.92480 16070.655911 19728.853342 7 23148482264669"] | false | true |
boleto.isValid#["00170000010114971860168524522114275860000102656"] | false | true |
boleto.isValid#["00180000000114971860168524522114475860000102656"] | false | true |
boleto.isValid#["0017000001 01149.718601 68524.522114 2 75860000102656"] | false | true |
boleto.isValid#["00100000080114971860168524522114175860000102656"] | false | true |
boleto.isValid#["00100000080114971860168524522114800000018236120"] | false | true |
boleto.isValid#["98800000060114971860168524522114775860018236120"] | false | true |
boleto.isValid#["98800000060114971860168524522114700001018236120"] | false | true |
boleto.isValid#["836200000005667800481000180975657313001589636081"] | true | false |
boleto.isValid#["846300000003299902962024004101360008002006441147"] | true | false |
boleto.isValid#["858900004609524601791605607593050865831483000010"] | true | false |
boleto.isValid#["848900000002404201622015806051904292586034111220"] | true | false |
boleto.isValid#["858000000070438403281922630720192528304729600523"] | true | false |
boleto.isValid#["838600000050096000190009000801782309000343062712"] | true | false |
boleto.isValid#["858200000007572503282030560708202107539591904460"] | true | false |
boleto.isValid#["85890000460524601791606075930508683148300001"] | true | false |
boleto.isValid#["84610000000-5 24610029110-2 00546033900-4 69589506108-0"] | true | false |
boleto.isValid#["abc00190000090114971860168524522114675860000102656zzz"] | false | true |
boleto.isValid#["00190000090114971860168524522114675860000102656x"] | false | true |
boleto.isValid#["00190.00009 01149.718601 68524.522114 6 7586000010265,6"] | false | true |
boleto.isValid#["(00190000090114971860168524522114675860000102656)"] | false | true |
boleto.isValid#[".00190000090114971860168524522114675860000102656"] | false | true |
boleto.isValid#["00190000090114971860168524522114675860000102656-"] | false | true |
boleto.isValid#["00196758600001026560000001149718606852452211"] | true | false |
boleto.isValid#["00192100000001026560000001149718606852452211"] | true | false |
boleto.isValid#["00191000000001026560000001149718606852452211"] | true | false |
boleto.isValid#["00196758600000000000000001149718606852452211"] | true | false |
boleto.isValid#["0019.6 75860000102656 0000001149718606852452211"] | true | false |
boleto.isValid#["98801000000182361200000001149718606852452211"] | true | false |
boleto.isValid#["84610000000246100291100054603390069589506108"] | true | false |
boleto.parse#[-1] | "" | "1" |
boleto.parse#[9007199254740992] | "" | "9007199254740992" |
caepf.format#[-1] | "" | "1" |
caepf.format#[1.5] | "" | "15" |
caepf.format#[9007199254740992] | "" | "900.719.925/474-09" |
caepf.format#["",{"pad":true}] | "" | "000.000.000/000-00" |
caepf.format#["---",{"pad":true}] | "" | "000.000.000/000-00" |
caepf.format#[null,{"pad":true}] | "" | "000.000.000/000-00" |
caepf.format#[-249859674386] | "" | "249.859.674/386" |
caepf.isValid#[-29311861000184] | false | true |
caepf.parse#[-1] | "" | "1" |
caepf.parse#[9007199254740992] | "" | "90071992547409" |
cbo.get#["142135"] | {"code":"142135","description":"Oficial de proteção de dados pessoais (dpo)"} | expected {"code":"142135","description":"Oficial de proteção de dados pessoais (dpo)"}, got null |
cbo.get#["2124--05"] | {"code":"212405","description":"Analista de desenvolvimento de sistemas"} | expected {"code":"212405","description":"Analista de desenvolvimento de sistemas"}, got null |
cbo.get#["782325"] | {"code":"782325","description":"Motorista de transporte por aplicativos"} | expected {"code":"782325","description":"Motorista de transporte por aplicativos"}, got null |
cbo.get#["142360"] | {"code":"142360","description":"Analista de sucesso do cliente - customer success"} | expected {"code":"142360","description":"Analista de sucesso do cliente - customer success"}, got null |
cbo.get#["225157"] | {"code":"225157","description":"Médico emergencista"} | expected {"code":"225157","description":"Médico emergencista"}, got null |
cbo.get#["322705"] | {"code":"322705","description":"Técnico em acupuntura"} | expected {"code":"322705","description":"Técnico em acupuntura"}, got null |
cbo.get#["121010"] | {"code":"121010","description":"Diretor geral de empresa e organizações (exceto do terceiro setor)"} | {"code":"121010","description":"Diretor geral de empresa e organizações (exceto de interesse público)"} |
cbo.get#["214535"] | {"code":"214535","description":"Tecnólogo em produção sucroalcooleira"} | {"code":"214535","description":"Tecnólogo em produção sulcroalcooleira"} |
cbo.get#["225142"] | null | {"code":"225142","description":"Médico da estratégia de saúde da família"} |
cbo.get#["322105"] | null | {"code":"322105","description":"Técnico em acupuntura"} |
cbo.get#["322115"] | null | {"code":"322115","description":"Técnico em quiropraxia"} |
cbo.get#["322120"] | null | {"code":"322120","description":"Massoterapeuta"} |
cbo.get#["322125"] | null | {"code":"322125","description":"Terapeuta holístico"} |
cbo.get#["782820"] | null | {"code":"782820","description":"Condutor de veículos a pedais"} |
cbo.isValid#["142135"] | true | false |
cbo.isValid#["2124--05"] | true | false |
cbo.isValid#["782325"] | true | false |
cbo.isValid#["142360"] | true | false |
cbo.isValid#["225157"] | true | false |
cbo.isValid#["322705"] | true | false |
cbo.isValid#["322105"] | false | true |
cbo.isValid#["782820"] | false | true |
cbo.isValid#["225142"] | false | true |
cbo.isValid#["322115"] | false | true |
cbo.isValid#["322120"] | false | true |
cbo.isValid#["322125"] | false | true |
cbo.parse#[-1] | "" | "1" |
cbo.parse#[9007199254740992] | "" | "900719" |
cei.format#[-1] | "" | "1" |
cei.format#[1.5] | "" | "15" |
cei.format#[9007199254740992] | "" | "90.071.99254/74" |
cei.format#["",{"pad":true}] | "" | "00.000.00000/00" |
cei.format#["---",{"pad":true}] | "" | "00.000.00000/00" |
cei.format#[null,{"pad":true}] | "" | "00.000.00000/00" |
cei.format#[-249859674386] | "" | "24.985.96743/86" |
cei.isValid#["115.830.02498/5"] | false | true |
cei.isValid#[-277297118187] | false | true |
cei.isValid#[-249859674386] | false | true |
cei.parse#[-1] | "" | "1" |
cei.parse#[9007199254740992] | "" | "900719925474" |
cep.format#[""] | "" | expected "", got null |
cep.format#["0"] | "0" | expected "0", got null |
cep.format#["01"] | "01" | expected "01", got null |
cep.format#["010"] | "010" | expected "010", got null |
cep.format#["0100"] | "0100" | expected "0100", got null |
cep.format#["01001"] | "01001" | expected "01001", got null |
cep.format#["010010"] | "01001-0" | expected "01001-0", got null |
cep.format#["0100100"] | "01001-00" | expected "01001-00", got null |
cep.format#["01001000000000"] | "01001-000" | expected "01001-000", got null |
cep.format#["a0.10cr01?00#ab0"] | "01001-000" | expected "01001-000", got null |
cep.format#negative-number | "" | expected "", got null |
cep.format#fractional-number | "" | expected "", got null |
cep.format#unsafe-number | "" | expected "", got null |
cep.isValid#["01310-100"] | true | false |
cep.isValid#[20040020] | true | false |
cep.isValid#[" 01310-100 "] | true | false |
cep.isValid#["92.500-000"] | true | false |
cep.isValid#["013 10 100"] | true | false |
cep.isValid#["01310.100"] | true | false |
cep.isValid#["01310/100"] | true | false |
cep.isValid#["0131/0100"] | true | false |
cep.isValid#["--0131 0100"] | true | false |
cep.isValid#["01310/100/"] | true | false |
cep.parse#negative-number | "" | "20040020" |
cep.parse#unsafe-number | "" | "90071992" |
certidao.format#[1045390155.2] | "" | "104539 01 55 2" |
certidao.format#[-1] | "" | "1" |
certidao.format#[9007199254740992] | "" | "900719 92 54 7409 9 2" |
certidao.format#["",{"pad":true}] | "" | "000000 00 00 0000 0 00000 000 0000000 00" |
certidao.format#["abc",{"pad":true}] | "" | "000000 00 00 0000 0 00000 000 0000000 00" |
certidao.getInfo#["104539 01 55 2013 1 00012 021 0000123 21"] | {"registryCns":"104539","acervo":"01","service":"55","year":2013,"type":"birth","typeCode":1,"book":"00012","page":"021","term":"0000123","checkDigits":"21"} | {"registryCns":"104539","acervo":"01","service":"55","year":2013,"type":"birth","book":"00012","page":"021","term":"0000123","checkDigits":"21"} |
certidao.getInfo#["094300 01 55 2010 1 00020 112 0000120-87"] | {"registryCns":"094300","acervo":"01","service":"55","year":2010,"type":"birth","typeCode":1,"book":"00020","page":"112","term":"0000120","checkDigits":"87"} | {"registryCns":"094300","acervo":"01","service":"55","year":2010,"type":"birth","book":"00020","page":"112","term":"0000120","checkDigits":"87"} |
certidao.getInfo#["82668301552015209245842999011418"] | {"registryCns":"826683","acervo":"01","service":"55","year":2015,"type":"marriage","typeCode":2,"book":"09245","page":"842","term":"9990114","checkDigits":"18"} | expected {"registryCns":"826683","acervo":"01","service":"55","year":2015,"type":"marriage","typeCode":2,"book":"09245","page":"842","term":"9990114","checkDigits":"18"}, got null |
certidao.getInfo#["10453901552013800012021000012343"] | {"registryCns":"104539","acervo":"01","service":"55","year":2013,"type":"emancipation","typeCode":8,"book":"00012","page":"021","term":"0000123","checkDigits":"43"} | {"registryCns":"104539","acervo":"01","service":"55","year":2013,"type":"emancipation","book":"00012","page":"021","term":"0000123","checkDigits":"43"} |
certidao.getInfo#["10453901552013900012021000012398"] | {"registryCns":"104539","acervo":"01","service":"55","year":2013,"type":"interdiction","typeCode":9,"book":"00012","page":"021","term":"0000123","checkDigits":"98"} | {"registryCns":"104539","acervo":"01","service":"55","year":2013,"type":"interdiction","book":"00012","page":"021","term":"0000123","checkDigits":"98"} |
certidao.isValid#["1045.3901.5520.1310.0012.0210.0001.2321"] | false | true |
certidao.isValid#["82668301552015209245842999011418"] | true | false |
certidao.isValid#["79975401552015772710866666109571"] | true | false |
certidao.isValid#["10453901552013700012021000012315"] | true | false |
certidao.parse#[-1] | "" | "1" |
certidao.parse#[9007199254740992] | "" | "9007199254740992" |
cfop.get#["5..102"] | {"code":"5102","description":"Venda de mercadoria adquirida ou recebida de terceiros, ou qualquer venda de mercadoria efetuada pelo MEI com exceção das saídas classificadas nos códigos 5.501, 5.502, 5.504 e 5.505"} | expected {"code":"5102","description":"Venda de mercadoria adquirida ou recebida de terceiros, ou qualquer venda de mercadoria efetuada pelo MEI com exceção das saídas classificadas nos códigos 5.501, 5.502, 5.504 e 5.505"}, got null |
cfop.isValid#["5..102"] | true | false |
cfop.parse#[-1] | "" | "1" |
cfop.parse#[9007199254740992] | "" | "9007" |
cnae.format#["",{"pad":true}] | "" | "0000-0/00" |
cnae.format#[-6201501] | "" | "6201-5/01" |
cnae.format#[620150.1] | "" | "6201-5/01" |
cnae.format#[9007199254740992] | "" | "9007-1/99" |
cnae.format#[-6201501,{"pad":true}] | "" | "6201-5/01" |
cnae.format#[null,{"pad":true}] | "" | "0000-0/00" |
cnae.format#["abc",{"pad":true}] | "" | "0000-0/00" |
cnae.get#["6201--5//01"] | {"code":"6201501","description":"DESENVOLVIMENTO DE PROGRAMAS DE COMPUTADOR SOB ENCOMENDA"} | expected {"code":"6201501","description":"DESENVOLVIMENTO DE PROGRAMAS DE COMPUTADOR SOB ENCOMENDA"}, got null |
cnae.isValid#["6201--5//01"] | true | false |
cnae.isValid#["6201 5 01"] | true | false |
cnae.isValid#["6201.5.01"] | true | false |
cnae.parse#[-1] | "" | "1" |
cnae.parse#[9007199254740992] | "" | "9007199" |
cnh.format#["02650306461",{"obfuscate":true}] | "***503064-**" | "026503064-61" |
cnh.format#["98765432119",{"obfuscate":true}] | "***654321-**" | "987654321-19" |
cnh.format#[98765432119,{"obfuscate":true}] | "***654321-**" | "987654321-19" |
cnh.format#["9876",{"obfuscate":true}] | "***6" | "9876" |
cnh.format#["9876",{"pad":true,"obfuscate":true}] | "***000098-**" | "000000098-76" |
cnh.format#[-1] | "" | "1" |
cnh.format#[1.5] | "" | "15" |
cnh.format#[9007199254740992] | "" | "900719925-4740992" |
cnh.format#[9007199254740992,{"pad":true}] | "" | "900719925-4740992" |
cnh.format#["",{"pad":true}] | "" | "000000000-00" |
cnh.format#["abc",{"pad":true}] | "" | "000000000-00" |
cnh.isValid#["ab00000000119"] | false | true |
cnh.isValid#["00000000119ab"] | false | true |
cnh.isValid#["000000001_19"] | false | true |
cnh.parse#[-1] | "" | "1" |
cnh.parse#[9007199254740992] | "" | "90071992547" |
cno.format#[-1] | "" | "1" |
cno.format#[1.5] | "" | "15" |
cno.format#[9007199254740992] | "" | "90.071.99254/74" |
cno.format#["",{"pad":true}] | "" | "00.000.00000/00" |
cno.format#["---",{"pad":true}] | "" | "00.000.00000/00" |
cno.format#[null,{"pad":true}] | "" | "00.000.00000/00" |
cno.format#[-249859674386] | "" | "24.985.96743/86" |
cno.isValid#["110.840.16806/2"] | false | true |
cno.isValid#[-110840168062] | false | true |
cno.parse#[-1] | "" | "1" |
cno.parse#[9007199254740992] | "" | "900719925474" |
cnpj.format#[""] | "" | expected "", got null |
cnpj.format#["4"] | "4" | expected "4", got null |
cnpj.format#["46"] | "46" | expected "46", got null |
cnpj.format#["468"] | "46.8" | expected "46.8", got null |
cnpj.format#["4684"] | "46.84" | expected "46.84", got null |
cnpj.format#["46843"] | "46.843" | expected "46.843", got null |
cnpj.format#["468434"] | "46.843.4" | expected "46.843.4", got null |
cnpj.format#["4684348"] | "46.843.48" | expected "46.843.48", got null |
cnpj.format#["46843485"] | "46.843.485" | expected "46.843.485", got null |
cnpj.format#["468434850"] | "46.843.485/0" | expected "46.843.485/0", got null |
cnpj.format#["4684348500"] | "46.843.485/00" | expected "46.843.485/00", got null |
cnpj.format#["46843485000"] | "46.843.485/000" | expected "46.843.485/000", got null |
cnpj.format#["468434850001"] | "46.843.485/0001" | expected "46.843.485/0001", got null |
cnpj.format#["4684348500018"] | "46.843.485/0001-8" | expected "46.843.485/0001-8", got null |
cnpj.format#[4] | "4" | expected "4", got null |
cnpj.format#[46] | "46" | expected "46", got null |
cnpj.format#[468] | "46.8" | expected "46.8", got null |
cnpj.format#[4684] | "46.84" | expected "46.84", got null |
cnpj.format#[46843] | "46.843" | expected "46.843", got null |
cnpj.format#[468434] | "46.843.4" | expected "46.843.4", got null |
cnpj.format#[4684348] | "46.843.48" | expected "46.843.48", got null |
cnpj.format#[46843485] | "46.843.485" | expected "46.843.485", got null |
cnpj.format#[468434850] | "46.843.485/0" | expected "46.843.485/0", got null |
cnpj.format#[4684348500] | "46.843.485/00" | expected "46.843.485/00", got null |
cnpj.format#[46843485000] | "46.843.485/000" | expected "46.843.485/000", got null |
cnpj.format#[468434850001] | "46.843.485/0001" | expected "46.843.485/0001", got null |
cnpj.format#[4684348500018] | "46.843.485/0001-8" | expected "46.843.485/0001-8", got null |
cnpj.format#[46843485000186] | "46.843.485/0001-86" | expected "46.843.485/0001-86", got null |
cnpj.format#["468434850001860000000000"] | "46.843.485/0001-86" | expected "46.843.485/0001-86", got null |
cnpj.format#["46.?ABC843.485/0001-86abc"] | "46.843.485/0001-86" | expected "46.843.485/0001-86", got null |
cnpj.format#[-11222333000181] | "" | expected "", got null |
cnpj.format#[-1] | "" | expected "", got null |
cnpj.format#[1.5] | "" | expected "", got null |
cnpj.format#[9007199254740992] | "" | expected "", got null |
cnpj.format#["24522200000174"] | "24.522.200/0001-74" | expected "24.522.200/0001-74", got null |
cnpj.format#["12OUT345000199"] | "12.345.000/199" | expected "12.345.000/199", got null |
cnpj.isValid#["60.391.947/0001-00"] | true | false |
cnpj.isValid#["11 222 333 0001 81"] | true | false |
cnpj.isValid#[" 13723705000189 "] | true | false |
cnpj.parse#[-11222333000181] | "" | "11222333000181" |
cnpj.parse#[-1] | "" | "1" |
cnpj.parse#[9007199254740992] | "" | "90071992547409" |
cns.format#["",{"pad":true}] | "" | "000 0000 0000 0000" |
cns.format#[-1] | "" | "1" |
cns.format#[1.5] | "" | "15" |
cns.format#[9007199254740992] | "" | "900 7199 2547 4099" |
cns.format#["abc",{"pad":true}] | "" | "000 0000 0000 0000" |
cns.isValid#["1234 5678 9010 000"] | false | true |
cns.isValid#["100000000060018"] | true | false |
cns.isValid#[-139457218230006] | false | true |
cns.isValid#[-123456789010000] | false | true |
cns.parse#[-1] | "" | "1" |
cns.parse#[9007199254740992] | "" | "900719925474099" |
cpf.format#[""] | "" | expected "", got null |
cpf.format#["9"] | "9" | expected "9", got null |
cpf.format#["94"] | "94" | expected "94", got null |
cpf.format#["943"] | "943" | expected "943", got null |
cpf.format#["9438"] | "943.8" | expected "943.8", got null |
cpf.format#["94389"] | "943.89" | expected "943.89", got null |
cpf.format#["943895"] | "943.895" | expected "943.895", got null |
cpf.format#["9438957"] | "943.895.7" | expected "943.895.7", got null |
cpf.format#["94389575"] | "943.895.75" | expected "943.895.75", got null |
cpf.format#["943895751"] | "943.895.751" | expected "943.895.751", got null |
cpf.format#["9438957510"] | "943.895.751-0" | expected "943.895.751-0", got null |
cpf.format#[9] | "9" | expected "9", got null |
cpf.format#[94] | "94" | expected "94", got null |
cpf.format#[943] | "943" | expected "943", got null |
cpf.format#[9438] | "943.8" | expected "943.8", got null |
cpf.format#[94389] | "943.89" | expected "943.89", got null |
cpf.format#[943895] | "943.895" | expected "943.895", got null |
cpf.format#[9438957] | "943.895.7" | expected "943.895.7", got null |
cpf.format#[94389575] | "943.895.75" | expected "943.895.75", got null |
cpf.format#[943895751] | "943.895.751" | expected "943.895.751", got null |
cpf.format#[9438957510] | "943.895.751-0" | expected "943.895.751-0", got null |
cpf.format#[94389575104] | "943.895.751-04" | expected "943.895.751-04", got null |
cpf.format#["94389575104000000"] | "943.895.751-04" | expected "943.895.751-04", got null |
cpf.format#["943.?ABC895.751-04abc"] | "943.895.751-04" | expected "943.895.751-04", got null |
cpf.format#[123456789.09] | "" | expected "", got null |
cpf.format#[-1] | "" | expected "", got null |
cpf.format#[1.5] | "" | expected "", got null |
cpf.format#[9007199254740992] | "" | expected "", got null |
cpf.isValid#["962.718.458-60"] | true | false |
cpf.isValid#["123 456 789 09"] | true | false |
cpf.isValid#[" 12345678909"] | true | false |
cpf.isValid#["12345678909 "] | true | false |
cpf.isValid#["280.012.389-38"] | true | false |
cpf.parse#[-12345678909] | "" | "12345678909" |
cpf.parse#[9007199254740992] | "" | "90071992547" |
creditCard.isValid#[-4111111111111111] | false | true |
creditCard.isValid#["-4111111111111111"] | false | true |
creditCard.isValid#["4111111111111111."] | false | true |
cst.isValid#["002",{"tax":"icms"}] | true | false |
cst.isValid#["015",{"tax":"icms"}] | true | false |
cst.isValid#["053",{"tax":"icms"}] | true | false |
cst.isValid#["061",{"tax":"icms"}] | true | false |
cst.isValid#["10",{"tax":"icms"}] | true | false |
cst.isValid#["00",{"tax":"icms"}] | true | false |
cst.isValid#[2,{"tax":"icms"}] | true | false |
cst.isValid#["2",{"tax":"icms"}] | true | false |
cst.isValid#["0 10",{"tax":"icms"}] | true | false |
cst.isValid#["0/10",{"tax":"icms"}] | true | false |
cst.isValid#["1--10",{"tax":"icms"}] | true | false |
cst.isValid#["02",{"tax":"icms"}] | true | false |
cst.isValid#["15",{"tax":"icms"}] | true | false |
cst.isValid#["20",{"tax":"icms"}] | true | false |
cst.isValid#["30",{"tax":"icms"}] | true | false |
cst.isValid#["40",{"tax":"icms"}] | true | false |
cst.isValid#["41",{"tax":"icms"}] | true | false |
cst.isValid#["50",{"tax":"icms"}] | true | false |
cst.isValid#["51",{"tax":"icms"}] | true | false |
cst.isValid#["53",{"tax":"icms"}] | true | false |
cst.isValid#["60",{"tax":"icms"}] | true | false |
cst.isValid#["61",{"tax":"icms"}] | true | false |
cst.isValid#["70",{"tax":"icms"}] | true | false |
cst.isValid#["90",{"tax":"icms"}] | true | false |
cst.isValid#["15"] | true | false |
cst.isValid#["00",null] | true | expected true, threw: NoMethodError: undefined method `[]' for nil |
cst.isValid#["999",null] | false | expected false, threw: NoMethodError: undefined method `[]' for nil |
cst.isValid#["06","foo"] | true | expected true, threw: TypeError: no implicit conversion of Symbol into Integer |
cst.isValid#["06",1] | true | expected true, threw: TypeError: no implicit conversion of Symbol into Integer |
cst.isValid#["0 . 10",{"tax":"icms"}] | true | false |
cst.isValid#[60,{"tax":"icms"}] | true | false |
cst.isValid#[90,{"tax":"icms"}] | true | false |
currency.convertToWords#[100000000000000.02] | "cem trilhões de reais" | "cem trilhões de reais e dois centavos" |
currency.convertToWords#[1000000000000000] | "" | "um quadrilhão de reais" |
currency.format#[-0.01,{"symbol":true}] | "-R$ 0,01" | "R$ -0,01" |
currency.format#[-0.1,{"symbol":true}] | "-R$ 0,10" | "R$ -0,10" |
currency.format#[-1,{"symbol":true}] | "-R$ 1,00" | "R$ -1,00" |
currency.format#[-10,{"symbol":true}] | "-R$ 10,00" | "R$ -10,00" |
currency.format#[-10.1,{"symbol":true}] | "-R$ 10,10" | "R$ -10,10" |
currency.format#[-10.01,{"symbol":true}] | "-R$ 10,01" | "R$ -10,01" |
currency.format#[-100.01,{"symbol":true}] | "-R$ 100,01" | "R$ -100,01" |
currency.format#[-1000.01,{"symbol":true}] | "-R$ 1.000,01" | "R$ -1.000,01" |
currency.format#[-10000.01,{"symbol":true}] | "-R$ 10.000,01" | "R$ -10.000,01" |
currency.format#[-100000.01,{"symbol":true}] | "-R$ 100.000,01" | "R$ -100.000,01" |
currency.format#[-1000000.01,{"symbol":true}] | "-R$ 1.000.000,01" | "R$ -1.000.000,01" |
currency.format#["-R$ 1,00",{"symbol":true}] | "-R$ 1,00" | "R$ -1,00" |
currency.format#[""] | "0,00" | expected "0,00", got null |
currency.format#["abc"] | "0,00" | expected "0,00", got null |
currency.format#[null] | "0,00" | expected "0,00", got null |
currency.parse#["R$ 1.234"] | 1234 | 12.34 |
currency.parse#["R$ 1.000.000"] | 1000000 | 10000 |
currency.parse#["1.059"] | 1059 | 10.59 |
date.convertToWords#["01/01/0000"] | "" | "primeiro de janeiro de zero" |
date.convertToWords#["0000-01-01"] | "" | "primeiro de janeiro de zero" |
date.convertToWords#["29/02/1600"] | "vinte e nove de fevereiro de mil e seiscentos" | "vinte e nove de fevereiro de mil seiscentos" |
date.convertToWords#["29/02/0100"] | "" | "vinte e nove de fevereiro de cem" |
email.isValid#["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@example.com"] | false | true |
email.isValid#["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@a.com"] | false | true |
email.isValid#["user@aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.com"] | false | true |
email.isValid#["user@example.xn--p1ai"] | true | false |
email.isValid#["user@example.XN--P1AI"] | true | false |
email.isValid#["user@example.xn--aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"] | true | false |
email.isValid#["a%b@example.com"] | false | true |
iban.getInfo#["BR10 12AB 34CD 0000 1093 2840 814P 2"] | {"countryCode":"BR","checkDigits":"10","bankIspb":"12AB34CD","branch":"00001","account":"0932840814","accountType":"P","owner":"2"} | expected {"countryCode":"BR","checkDigits":"10","bankIspb":"12AB34CD","branch":"00001","account":"0932840814","accountType":"P","owner":"2"}, got null |
iban.isValid#["BR170000000A000010000012345C2"] | true | false |
iban.isValid#["BR1012AB34CD000010932840814P2"] | true | false |
iban.isValid#["br1012ab34cd000010932840814p2"] | true | false |
iban.parse#[-1] | "" | "1" |
iban.parse#[9007199254740992] | "" | "9007199254740992" |
legalNature.format#[206.2] | "" | "206-2" |
legalNature.format#[-1] | "" | "1" |
legalNature.format#[1.5] | "" | "15" |
legalNature.format#[9007199254740992] | "" | "900-7" |
legalNature.format#[206.2,{"pad":true}] | "" | "206-2" |
legalNature.format#["",{"pad":true}] | "" | "000-0" |
legalNature.format#["abc",{"pad":true}] | "" | "000-0" |
legalNature.get#["2076"] | {"code":"2076","description":"Sociedade Empresária em Nome Coletivo","category":{"code":"2","description":"Entidades Empresariais"},"legacy":true,"currentCode":"2070"} | expected {"code":"2076","description":"Sociedade Empresária em Nome Coletivo","category":{"code":"2","description":"Entidades Empresariais"},"legacy":true,"currentCode":"2070"}, got null |
legalNature.get#[-2062] | null | {"code":"2062","description":"Sociedade Empresária Limitada","category":{"code":"2","description":"Entidades Empresariais"},"legacy":false} |
legalNature.get#["2-0-6-2"] | null | {"code":"2062","description":"Sociedade Empresária Limitada","category":{"code":"2","description":"Entidades Empresariais"},"legacy":false} |
legalNature.get#["2062-"] | null | {"code":"2062","description":"Sociedade Empresária Limitada","category":{"code":"2","description":"Entidades Empresariais"},"legacy":false} |
legalNature.isValid#["5002"] | true | false |
legalNature.isValid#["2076"] | true | false |
legalNature.isValid#[-2062] | false | true |
legalNature.isValid#["206./ 2"] | true | false |
legalNature.isValid#["206/2"] | true | false |
legalNature.isValid#["-2062"] | false | true |
legalNature.isValid#["2062-"] | false | true |
legalNature.isValid#["-2-0-6-2"] | false | true |
legalNature.isValid#["2-0-6-2"] | false | true |
legalNature.isValid#["20.6.2"] | false | true |
legalNature.isValid#["20 62"] | false | true |
legalNature.isValid#["2-062"] | false | true |
legalNature.list#include-legacy | {"1015":"Órgão Público do Poder Executivo Federal","1023":"Órgão Público do Poder Executivo Estadual ou do Distrito Federal","1031":"Órgão Público do Poder Executivo Municipal","1040":"Órgão Público do Poder Legislativo Federal","1058":"Órgão Público do Poder Legislativo Estadual ou do Distrito Federal","1066":"Órgão Público do Poder Legislativo Municipal","1074":"Órgão Público do Poder Judiciário Federal","1082":"Órgão Público do Poder Judiciário Estadual","1104":"Autarquia Federal","1112":"Autarquia Estadual ou do Distrito Federal","1120":"Autarquia Municipal","1139":"Fundação Pública de Direito Público Federal","1147":"Fundação Pública de Direito Público Estadual ou do Distrito Federal","1155":"Fundação Pública de Direito Público Municipal","1163":"Órgão Público Autônomo Federal","1171":"Órgão Público Autônomo Estadual ou do Distrito Federal","1180":"Órgão Público Autônomo Municipal","1198":"Comissão Polinacional","1210":"Consórcio Público de Direito Público (Associação Pública)","1228":"Consórcio Público de Direito Privado","1236":"Estado ou Distrito Federal","1244":"Município","1252":"Fundação Pública de Direito Privado Federal","1260":"Fundação Pública de Direito Privado Estadual ou do Distrito Federal","1279":"Fundação Pública de Direito Privado Municipal","1287":"Fundo Público da Administração Indireta Federal","1295":"Fundo Público da Administração Indireta Estadual ou do Distrito Federal","1309":"Fundo Público da Administração Indireta Municipal","1317":"Fundo Público da Administração Direta Federal","1325":"Fundo Público da Administração Direta Estadual ou do Distrito Federal","1333":"Fundo Público da Administração Direta Municipal","1341":"União","2011":"Empresa Pública","2038":"Sociedade de Economia Mista","2046":"Sociedade Anônima Aberta","2054":"Sociedade Anônima Fechada","2062":"Sociedade Empresária Limitada","2070":"Sociedade Empresária em Nome Coletivo","2076":"Sociedade Empresária em Nome Coletivo","2089":"Sociedade Empresária em Comandita Simples","2097":"Sociedade Empresária em Comandita por Ações","2100":"Sociedade Mercantil de Capital e Indústria (extinta pelo NCC/2002)","2127":"Sociedade em Conta de Participação","2135":"Empresário (Individual)","2143":"Cooperativa","2151":"Consórcio de Sociedades","2160":"Grupo de Sociedades","2178":"Estabelecimento, no Brasil, de Sociedade Estrangeira","2194":"Estabelecimento, no Brasil, de Empresa Binacional Argentino-Brasileira","2208":"Entidade Binacional Itaipu","2216":"Empresa Domiciliada no Exterior","2224":"Clube/Fundo de Investimento","2232":"Sociedade Simples Pura","2240":"Sociedade Simples Limitada","2259":"Sociedade Simples em Nome Coletivo","2267":"Sociedade Simples em Comandita Simples","2275":"Empresa Binacional","2283":"Consórcio de Empregadores","2291":"Consórcio Simples","2305":"Empresa Individual de Responsabilidade Limitada (de Natureza Empresária)","2313":"Empresa Individual de Responsabilidade Limitada (de Natureza Simples)","2321":"Sociedade Unipessoal de Advogados","2330":"Cooperativas de Consumo","2348":"Empresa Simples de Inovação - Inova Simples","2356":"Investidor Não Residente","3034":"Serviço Notarial e Registral (Cartório)","3042":"Organização Social","3050":"Organização da Sociedade Civil de Interesse Público (Oscip)","3069":"Fundação Privada","3077":"Serviço Social Autônomo","3085":"Condomínio Edilício","3093":"Unidade Executora (Programa Dinheiro Direto na Escola)","3107":"Comissão de Conciliação Prévia","3115":"Entidade de Mediação e Arbitragem","3123":"Partido Político","3131":"Entidade Sindical","3204":"Estabelecimento, no Brasil, de Fundação ou Associação Estrangeiras","3212":"Fundação ou Associação Domiciliada no Exterior","3220":"Organização Religiosa","3239":"Comunidade Indígena","3247":"Fundo Privado","3255":"Órgão de Direção Nacional de Partido Político","3263":"Órgão de Direção Regional de Partido Político","3271":"Órgão de Direção Local de Partido Político","3280":"Comitê Financeiro de Partido Político","3298":"Frente Plebiscitária ou Referendária","3301":"Organização Social (OS)","3310":"Demais Condomínios","3328":"Plano de Benefícios de Previdência Complementar Fechada","3999":"Associação Privada","4014":"Empresa Individual Imobiliária","4022":"Segurado Especial","4081":"Contribuinte individual","4090":"Candidato a Cargo Político Eletivo","4111":"Leiloeiro","4120":"Produtor Rural (Pessoa Física)","5002":"Organização Internacional e Outras Instituições Extraterritoriais","5010":"Organização Internacional","5029":"Representação Diplomática Estrangeira","5037":"Outras Instituições Extraterritoriais"} | {"1015":"Órgão Público do Poder Executivo Federal","1023":"Órgão Público do Poder Executivo Estadual ou do Distrito Federal","1031":"Órgão Público do Poder Executivo Municipal","1040":"Órgão Público do Poder Legislativo Federal","1058":"Órgão Público do Poder Legislativo Estadual ou do Distrito Federal","1066":"Órgão Público do Poder Legislativo Municipal","1074":"Órgão Público do Poder Judiciário Federal","1082":"Órgão Público do Poder Judiciário Estadual","1104":"Autarquia Federal","1112":"Autarquia Estadual ou do Distrito Federal","1120":"Autarquia Municipal","1139":"Fundação Pública de Direito Público Federal","1147":"Fundação Pública de Direito Público Estadual ou do Distrito Federal","1155":"Fundação Pública de Direito Público Municipal","1163":"Órgão Público Autônomo Federal","1171":"Órgão Público Autônomo Estadual ou do Distrito Federal","1180":"Órgão Público Autônomo Municipal","1198":"Comissão Polinacional","1210":"Consórcio Público de Direito Público (Associação Pública)","1228":"Consórcio Público de Direito Privado","1236":"Estado ou Distrito Federal","1244":"Município","1252":"Fundação Pública de Direito Privado Federal","1260":"Fundação Pública de Direito Privado Estadual ou do Distrito Federal","1279":"Fundação Pública de Direito Privado Municipal","1287":"Fundo Público da Administração Indireta Federal","1295":"Fundo Público da Administração Indireta Estadual ou do Distrito Federal","1309":"Fundo Público da Administração Indireta Municipal","1317":"Fundo Público da Administração Direta Federal","1325":"Fundo Público da Administração Direta Estadual ou do Distrito Federal","1333":"Fundo Público da Administração Direta Municipal","1341":"União","2011":"Empresa Pública","2038":"Sociedade de Economia Mista","2046":"Sociedade Anônima Aberta","2054":"Sociedade Anônima Fechada","2062":"Sociedade Empresária Limitada","2070":"Sociedade Empresária em Nome Coletivo","2089":"Sociedade Empresária em Comandita Simples","2097":"Sociedade Empresária em Comandita por Ações","2127":"Sociedade em Conta de Participação","2135":"Empresário (Individual)","2143":"Cooperativa","2151":"Consórcio de Sociedades","2160":"Grupo de Sociedades","2178":"Estabelecimento, no Brasil, de Sociedade Estrangeira","2194":"Estabelecimento, no Brasil, de Empresa Binacional Argentino-Brasileira","2216":"Empresa Domiciliada no Exterior","2224":"Clube/Fundo de Investimento","2232":"Sociedade Simples Pura","2240":"Sociedade Simples Limitada","2259":"Sociedade Simples em Nome Coletivo","2267":"Sociedade Simples em Comandita Simples","2275":"Empresa Binacional","2283":"Consórcio de Empregadores","2291":"Consórcio Simples","2305":"Empresa Individual de Responsabilidade Limitada (de Natureza Empresária)","2313":"Empresa Individual de Responsabilidade Limitada (de Natureza Simples)","2321":"Sociedade Unipessoal de Advogados","2330":"Cooperativas de Consumo","2348":"Empresa Simples de Inovação - Inova Simples","2356":"Investidor Não Residente","3034":"Serviço Notarial e Registral (Cartório)","3069":"Fundação Privada","3077":"Serviço Social Autônomo","3085":"Condomínio Edilício","3107":"Comissão de Conciliação Prévia","3115":"Entidade de Mediação e Arbitragem","3131":"Entidade Sindical","3204":"Estabelecimento, no Brasil, de Fundação ou Associação Estrangeiras","3212":"Fundação ou Associação Domiciliada no Exterior","3220":"Organização Religiosa","3239":"Comunidade Indígena","3247":"Fundo Privado","3255":"Órgão de Direção Nacional de Partido Político","3263":"Órgão de Direção Regional de Partido Político","3271":"Órgão de Direção Local de Partido Político","3280":"Comitê Financeiro de Partido Político","3298":"Frente Plebiscitária ou Referendária","3301":"Organização Social (OS)","3310":"Demais Condomínios","3328":"Plano de Benefícios de Previdência Complementar Fechada","3999":"Associação Privada","4014":"Empresa Individual Imobiliária","4022":"Segurado Especial","4081":"Contribuinte individual","4090":"Candidato a Cargo Político Eletivo","4111":"Leiloeiro","4120":"Produtor Rural (Pessoa Física)","5010":"Organização Internacional","5029":"Representação Diplomática Estrangeira","5037":"Outras Instituições Extraterritoriais"} |
legalNature.listByCategory#["5",{"includeLegacy":true}] | [{"code":"5002","description":"Organização Internacional e Outras Instituições Extraterritoriais","category":{"code":"5","description":"Organizações Internacionais e Outras Instituições Extraterritoriais"},"legacy":true,"currentCode":"5010"},{"code":"5010","description":"Organização Internacional","category":{"code":"5","description":"Organizações Internacionais e Outras Instituições Extraterritoriais"},"legacy":false},{"code":"5029","description":"Representação Diplomática Estrangeira","category":{"code":"5","description":"Organizações Internacionais e Outras Instituições Extraterritoriais"},"legacy":false},{"code":"5037","description":"Outras Instituições Extraterritoriais","category":{"code":"5","description":"Organizações Internacionais e Outras Instituições Extraterritoriais"},"legacy":false}] | [{"code":"5010","description":"Organização Internacional","category":{"code":"5","description":"Organizações Internacionais e Outras Instituições Extraterritoriais"},"legacy":false},{"code":"5029","description":"Representação Diplomática Estrangeira","category":{"code":"5","description":"Organizações Internacionais e Outras Instituições Extraterritoriais"},"legacy":false},{"code":"5037","description":"Outras Instituições Extraterritoriais","category":{"code":"5","description":"Organizações Internacionais e Outras Instituições Extraterritoriais"},"legacy":false}] |
legalNature.listByCategory#[3,{"includeLegacy":true}] | [{"code":"3034","description":"Serviço Notarial e Registral (Cartório)","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3042","description":"Organização Social","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":true,"currentCode":"3069"},{"code":"3050","description":"Organização da Sociedade Civil de Interesse Público (Oscip)","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":true,"currentCode":null},{"code":"3069","description":"Fundação Privada","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3077","description":"Serviço Social Autônomo","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3085","description":"Condomínio Edilício","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3093","description":"Unidade Executora (Programa Dinheiro Direto na Escola)","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":true,"currentCode":"3999"},{"code":"3107","description":"Comissão de Conciliação Prévia","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3115","description":"Entidade de Mediação e Arbitragem","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3123","description":"Partido Político","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":true,"currentCode":null},{"code":"3131","description":"Entidade Sindical","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3204","description":"Estabelecimento, no Brasil, de Fundação ou Associação Estrangeiras","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3212","description":"Fundação ou Associação Domiciliada no Exterior","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3220","description":"Organização Religiosa","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3239","description":"Comunidade Indígena","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3247","description":"Fundo Privado","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3255","description":"Órgão de Direção Nacional de Partido Político","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3263","description":"Órgão de Direção Regional de Partido Político","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3271","description":"Órgão de Direção Local de Partido Político","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3280","description":"Comitê Financeiro de Partido Político","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3298","description":"Frente Plebiscitária ou Referendária","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3301","description":"Organização Social (OS)","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3310","description":"Demais Condomínios","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3328","description":"Plano de Benefícios de Previdência Complementar Fechada","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3999","description":"Associação Privada","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false}] | [{"code":"3034","description":"Serviço Notarial e Registral (Cartório)","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3069","description":"Fundação Privada","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3077","description":"Serviço Social Autônomo","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3085","description":"Condomínio Edilício","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3107","description":"Comissão de Conciliação Prévia","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3115","description":"Entidade de Mediação e Arbitragem","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3131","description":"Entidade Sindical","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3204","description":"Estabelecimento, no Brasil, de Fundação ou Associação Estrangeiras","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3212","description":"Fundação ou Associação Domiciliada no Exterior","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3220","description":"Organização Religiosa","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3239","description":"Comunidade Indígena","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3247","description":"Fundo Privado","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3255","description":"Órgão de Direção Nacional de Partido Político","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3263","description":"Órgão de Direção Regional de Partido Político","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3271","description":"Órgão de Direção Local de Partido Político","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3280","description":"Comitê Financeiro de Partido Político","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3298","description":"Frente Plebiscitária ou Referendária","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3301","description":"Organização Social (OS)","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3310","description":"Demais Condomínios","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3328","description":"Plano de Benefícios de Previdência Complementar Fechada","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false},{"code":"3999","description":"Associação Privada","category":{"code":"3","description":"Entidades sem Fins Lucrativos"},"legacy":false}] |
legalNature.parse#[-1] | "" | "1" |
legalProcess.format#[""] | "" | expected "", got null |
legalProcess.format#["0"] | "0" | expected "0", got null |
legalProcess.format#["00"] | "00" | expected "00", got null |
legalProcess.format#["000"] | "000" | expected "000", got null |
legalProcess.format#["0002"] | "0002" | expected "0002", got null |
legalProcess.format#["00020"] | "00020" | expected "00020", got null |
legalProcess.format#["000208"] | "000208" | expected "000208", got null |
legalProcess.format#["0002080"] | "0002080" | expected "0002080", got null |
legalProcess.format#["00020802"] | "0002080-2" | expected "0002080-2", got null |
legalProcess.format#["000208025"] | "0002080-25" | expected "0002080-25", got null |
legalProcess.format#["0002080252"] | "0002080-25.2" | expected "0002080-25.2", got null |
legalProcess.format#["00020802520"] | "0002080-25.20" | expected "0002080-25.20", got null |
legalProcess.format#["000208025201"] | "0002080-25.201" | expected "0002080-25.201", got null |
legalProcess.format#["0002080252012"] | "0002080-25.2012" | expected "0002080-25.2012", got null |
legalProcess.format#["00020802520125"] | "0002080-25.2012.5" | expected "0002080-25.2012.5", got null |
legalProcess.format#["000208025201251"] | "0002080-25.2012.5.1" | expected "0002080-25.2012.5.1", got null |
legalProcess.format#["0002080252012515"] | "0002080-25.2012.5.15" | expected "0002080-25.2012.5.15", got null |
legalProcess.format#["00020802520125150"] | "0002080-25.2012.5.15.0" | expected "0002080-25.2012.5.15.0", got null |
legalProcess.format#["000208025201251500"] | "0002080-25.2012.5.15.00" | expected "0002080-25.2012.5.15.00", got null |
legalProcess.format#["0002080252012515004"] | "0002080-25.2012.5.15.004" | expected "0002080-25.2012.5.15.004", got null |
legalProcess.format#["00020802520125150049123123"] | "0002080-25.2012.5.15.0049" | expected "0002080-25.2012.5.15.0049", got null |
legalProcess.format#["0002080@$25201%!@2515.%0049123123"] | "0002080-25.2012.5.15.0049" | expected "0002080-25.2012.5.15.0049", got null |
legalProcess.format#[-1] | "" | expected "", got null |
legalProcess.format#[1.5] | "" | expected "", got null |
legalProcess.format#[9007199254740992] | "" | expected "", got null |
legalProcess.generate#[{"year":10000}] | null | "064734848100009130020" |
legalProcess.generate#[{"year":99999}] | null | "568943940999997060011" |
legalProcess.isValid#["-00020802520125150049"] | false | true |
legalProcess.isValid#["00020802520125150049."] | false | true |
legalProcess.isValid#[".0002080-25.2012.5.15.0049-"] | false | true |
legalProcess.isValid#["0002080/25.2012.5.15.0049"] | true | false |
legalProcess.isValid#["000208-0252012.5.15.0049"] | false | true |
legalProcess.isValid#["0000100-58.2008.1.01.0000"] | false | true |
legalProcess.isValid#[" 0002080-25.2012.5.15.0049 "] | true | false |
legalProcess.isValid#["\n00020802520125150049\t"] | true | false |
legalProcess.isValid#["0000100-85.2008.1.00.0000"] | true | false |
legalProcess.isValid#["0000100-04.2008.2.00.0000"] | true | false |
legalProcess.isValid#["0000100-20.2008.3.00.0000"] | true | false |
legalProcess.isValid#["0000100-09.2008.4.01.0000"] | true | false |
legalProcess.isValid#["0000100-18.2008.6.27.0000"] | true | false |
legalProcess.isValid#["0000100-51.2008.7.12.0000"] | true | false |
legalProcess.isValid#["0000100-68.2008.4.06.0000"] | true | false |
legalProcess.isValid#["0000100-31.2008.4.90.0000"] | true | false |
legalProcess.isValid#["0000100-47.2008.5.90.0000"] | true | false |
legalProcess.isValid#["0000100-52.2008.5.00.0000"] | true | false |
legalProcess.isValid#["0000100-68.2008.6.00.0000"] | true | false |
legalProcess.isValid#["0000100-84.2008.7.00.0000"] | true | false |
legalProcess.isValid#space-separated-fields | true | false |
legalProcess.isValid#mixed-separators | true | false |
legalProcess.parse#[-1] | "" | "1" |
legalProcess.parse#[9007199254740992] | "" | "9007199254740992" |
licensePlate.format#[""] | "" | expected "", got null |
licensePlate.format#["a"] | "A" | expected "A", got null |
licensePlate.format#["ab"] | "AB" | expected "AB", got null |
licensePlate.format#["abc"] | "ABC" | expected "ABC", got null |
licensePlate.format#["abc1"] | "ABC-1" | expected "ABC-1", got null |
licensePlate.format#["abc12"] | "ABC-12" | expected "ABC-12", got null |
licensePlate.format#["abc123"] | "ABC-123" | expected "ABC-123", got null |
licensePlate.format#["abc1d"] | "ABC1D" | expected "ABC1D", got null |
licensePlate.format#["abc1d2"] | "ABC1D2" | expected "ABC1D2", got null |
licensePlate.format#["abc1da2"] | "" | expected "", got null |
licensePlate.format#["abc12d"] | "" | expected "", got null |
licensePlate.format#["abc12d3"] | "" | expected "", got null |
licensePlate.format#["1"] | "" | expected "", got null |
licensePlate.format#["1ab4"] | "" | expected "", got null |
licensePlate.format#["ab14"] | "" | expected "", got null |
licensePlate.generate#mercosul-fifth-char-k-to-z | null | "ECU0A25" |
licensePlate.generate#explicit-mercosul | null | "XHU3I67" |
licensePlate.generate#unknown-format-falls-back | null | expected /^[A-Z]{3}[0-9][K-Z][0-9]{2}$/, got null |
licensePlate.generate#bogus-format-falls-back | null | null does not satisfy licensePlate.isValid (got false) |
licensePlate.isValid#["ABC 1234"] | true | false |
licensePlate.isValid#["ABC1D23",{"format":"LLLNNNN"}] | false | true |
licensePlate.isValid#["ABC1234",{"format":"LLLNLNN"}] | false | true |
licensePlate.isValid#["A-BC1234"] | false | true |
licensePlate.isValid#["AB-C1234"] | false | true |
licensePlate.isValid#["ABC12-34"] | false | true |
licensePlate.isValid#["ABC.1234"] | true | false |
licensePlate.isValid#["ABC/1234"] | true | false |
licensePlate.isValid#["ABC - 1234"] | true | false |
municipality.getByCode#[-3550308] | null | {"code":"3550308","name":"São Paulo","stateCode":"SP"} |
municipality.getByCode#[355030.8] | null | {"code":"3550308","name":"São Paulo","stateCode":"SP"} |
municipality.list#lowercase | [{"code":"5300108","name":"Brasília","stateCode":"DF"}] | [] |
municipality.list#padded | [{"code":"5300108","name":"Brasília","stateCode":"DF"}] | [] |
municipality.list#mixed-case | [{"code":"5300108","name":"Brasília","stateCode":"DF"}] | [] |
municipality.list#roraima-lowercase | [{"code":"1400050","name":"Alto Alegre","stateCode":"RR"},{"code":"1400027","name":"Amajari","stateCode":"RR"},{"code":"1400100","name":"Boa Vista","stateCode":"RR"},{"code":"1400159","name":"Bonfim","stateCode":"RR"},{"code":"1400175","name":"Cantá","stateCode":"RR"},{"code":"1400209","name":"Caracaraí","stateCode":"RR"},{"code":"1400233","name":"Caroebe","stateCode":"RR"},{"code":"1400282","name":"Iracema","stateCode":"RR"},{"code":"1400308","name":"Mucajaí","stateCode":"RR"},{"code":"1400407","name":"Normandia","stateCode":"RR"},{"code":"1400456","name":"Pacaraima","stateCode":"RR"},{"code":"1400472","name":"Rorainópolis","stateCode":"RR"},{"code":"1400506","name":"São João da Baliza","stateCode":"RR"},{"code":"1400605","name":"São Luiz do Anauá","stateCode":"RR"},{"code":"1400704","name":"Uiramutã","stateCode":"RR"}] | [] |
ncm.format#["",{"pad":true}] | "" | "0000.00.00" |
ncm.format#[-84713012] | "" | "8471.30.12" |
ncm.format#[8471301.2] | "" | "8471.30.12" |
ncm.format#[9007199254740992] | "" | "9007.19.92" |
ncm.format#[null,{"pad":true}] | "" | "0000.00.00" |
ncm.format#["abc",{"pad":true}] | "" | "0000.00.00" |
ncm.isValid#["2203..00.00"] | true | false |
ncm.parse#[-1] | "" | "1" |
ncm.parse#[9007199254740992] | "" | "90071992" |
nfeKey.format#["35260712ABC34501DE35550010000001231102030403"] | "3526 0712 ABC3 4501 DE35 5500 1000 0001 2311 0203 0403" | "3526 0712 3450 1355 5001 0000 0012 3110 2030 403" |
nfeKey.format#["35260712abc34501de35550010000001231102030403"] | "3526 0712 ABC3 4501 DE35 5500 1000 0001 2311 0203 0403" | "3526 0712 3450 1355 5001 0000 0012 3110 2030 403" |
nfeKey.format#["352607A2ABC34501DZ35"] | "3526 07A2 ABC3 4501 DZ35" | "3526 0723 4501 35" |
nfeKey.format#["35260712ABC34501DEA5"] | "3526 0712 ABC3 4501 DE5" | "3526 0712 3450 15" |
nfeKey.format#["35260712ABC34501DE3A5"] | "3526 0712 ABC3 4501 DE35" | "3526 0712 3450 135" |
nfeKey.format#["",{"pad":true}] | "" | "0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000" |
nfeKey.format#["abc",{"pad":true}] | "" | "0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000" |
nfeKey.format#[-1] | "" | "1" |
nfeKey.format#[1.5] | "" | "15" |
nfeKey.getInfo#["35170458716523000119550010000000128000123455"] | null | {"stateCode":"SP","year":2017,"month":4,"taxId":"58716523000119","model":"55","series":1,"number":12,"emissionType":8,"code":"00012345","checkDigit":5} |
nfeKey.getInfo#["35170458716523000119570010000000122000123453"] | null | {"stateCode":"SP","year":2017,"month":4,"taxId":"58716523000119","model":"57","series":1,"number":12,"emissionType":2,"code":"00012345","checkDigit":3} |
nfeKey.getInfo#["35170458716523000119670010000000123000123454"] | null | {"stateCode":"SP","year":2017,"month":4,"taxId":"58716523000119","model":"67","series":1,"number":12,"emissionType":3,"code":"00012345","checkDigit":4} |
nfeKey.getInfo#["35170458716523000119580010000000129000123454"] | null | {"stateCode":"SP","year":2017,"month":4,"taxId":"58716523000119","model":"58","series":1,"number":12,"emissionType":9,"code":"00012345","checkDigit":4} |
nfeKey.getInfo#["35170458716523000119630010000000123000123450"] | null | {"stateCode":"SP","year":2017,"month":4,"taxId":"58716523000119","model":"63","series":1,"number":12,"emissionType":3,"code":"00012345","checkDigit":0} |
nfeKey.getInfo#["35170458716523000119620010000000121000123450"] | {"stateCode":"SP","year":2017,"month":4,"taxId":"58716523000119","model":"62","series":1,"number":12,"emissionType":1,"authorizationSite":0,"code":"0012345","checkDigit":0} | {"stateCode":"SP","year":2017,"month":4,"taxId":"58716523000119","model":"62","series":1,"number":12,"emissionType":1,"code":"00012345","checkDigit":0} |
nfeKey.getInfo#["35170458716523000119660010000000121000123454"] | {"stateCode":"SP","year":2017,"month":4,"taxId":"58716523000119","model":"66","series":1,"number":12,"emissionType":1,"authorizationSite":0,"code":"0012345","checkDigit":4} | {"stateCode":"SP","year":2017,"month":4,"taxId":"58716523000119","model":"66","series":1,"number":12,"emissionType":1,"code":"00012345","checkDigit":4} |
nfeKey.getInfo#["35260712ABC34501DE35550010000001231102030403"] | {"stateCode":"SP","year":2026,"month":7,"taxId":"12ABC34501DE35","model":"55","series":1,"number":123,"emissionType":1,"code":"10203040","checkDigit":3} | expected {"stateCode":"SP","year":2026,"month":7,"taxId":"12ABC34501DE35","model":"55","series":1,"number":123,"emissionType":1,"code":"10203040","checkDigit":3}, got null |
nfeKey.getInfo#["35260712abc34501de35550010000001231102030403"] | {"stateCode":"SP","year":2026,"month":7,"taxId":"12ABC34501DE35","model":"55","series":1,"number":123,"emissionType":1,"code":"10203040","checkDigit":3} | expected {"stateCode":"SP","year":2026,"month":7,"taxId":"12ABC34501DE35","model":"55","series":1,"number":123,"emissionType":1,"code":"10203040","checkDigit":3}, got null |
nfeKey.isValid#["nfcom35170458716523000119620010000000121000123450"] | true | false |
nfeKey.isValid#["351 70458716523000119550010000000121000123458"] | false | true |
nfeKey.isValid#["3517 0458 7165 2300 0119 5500 1000 0000 1210 00123 458"] | false | true |
nfeKey.isValid#["35260712ABC34501DE35550010000001231102030403"] | true | false |
nfeKey.isValid#["3526 0712 ABC3 4501 DE35 5500 1000 0001 2311 0203 0403"] | true | false |
nfeKey.isValid#["3526.0712.ABC3.4501.DE35.5500.1000.0001.2311.0203.0403"] | true | false |
nfeKey.isValid#["NFe35260712ABC34501DE35550010000001231102030403"] | true | false |
nfeKey.isValid#["35260712abc34501de35550010000001231102030403"] | true | false |
nfeKey.isValid#["352607A2ABC34501DZ35550010000001231102030409"] | true | false |
nfeKey.isValid#["35260712ABC34501DE35620010000001231102030405"] | true | false |
nfeKey.isValid#["35260712ABC34501DE35570010000001231102030400"] | true | false |
nfeKey.isValid#["35170458716523000119640010000000123000123453"] | false | true |
nfeKey.parse#[-1] | "" | "1" |
nfeKey.parse#[9007199254740992] | "" | "9007199254740992" |
nfeKey.parse#["3526 0712 ABC3 4501 DE35 5500 1000 0001 2311 0203 0403"] | "35260712ABC34501DE35550010000001231102030403" | "352607123450135550010000001231102030403" |
nfeKey.parse#["NFe35260712ABC34501DE35550010000001231102030403"] | "35260712ABC34501DE35550010000001231102030403" | "352607123450135550010000001231102030403" |
nfeKey.parse#["35260712abc34501de35550010000001231102030403"] | "35260712ABC34501DE35550010000001231102030403" | "352607123450135550010000001231102030403" |
nfeKey.parse#["35260712ABC34501DEA5"] | "35260712ABC34501DE5" | "35260712345015" |
phone.format#["005540041234",{"mask":"e164"}] | "4004-1234" | "" |
phone.format#["+55 0800 123 4567",{"mask":"auto"}] | "0800 123 4567" | "55080-0123" |
phone.format#["+55 190",{"mask":"service"}] | "190" | "55190" |
phone.format#["5508001234567",{"mask":"auto"}] | "0800 123 4567" | "55080-0123" |
phone.format#["5508001234567",{"mask":"e164"}] | "0800 123 4567" | "+5508001234567" |
phone.format#["5508001234567",{"mask":"international"}] | "0800 123 4567" | "+55 08 00123-4567" |
phone.format#["5508001234567",{"mask":"service"}] | "0800 123 4567" | "5508001234567" |
phone.format#["55 0300 123 4567",{"mask":"auto"}] | "0300 123 4567" | "55030-0123" |
phone.format#["1",{"mask":"nanp"}] | "(1" | "1" |
phone.format#["11",{"mask":"nanp"}] | "(11" | "11" |
phone.format#["119",{"mask":"nanp"}] | "(11) 9" | "119" |
phone.format#["1198",{"mask":"nanp"}] | "(11) 98" | "1198" |
phone.format#["11988",{"mask":"nanp"}] | "(11) 988" | "11988" |
phone.format#["119888",{"mask":"nanp"}] | "(11) 9888" | "11988-8" |
phone.format#["1198888",{"mask":"nanp"}] | "(11) 98888" | "11988-88" |
phone.format#["11988887",{"mask":"nanp"}] | "(11) 98888-7" | "11988-887" |
phone.format#["119888877",{"mask":"nanp"}] | "(11) 98888-77" | "11988-8877" |
phone.format#["1198888777",{"mask":"nanp"}] | "(11) 9888-8777" | "11988-8877" |
phone.format#["11988887777",{"mask":"nanp"}] | "(11) 98888-7777" | "11988-8877" |
phone.format#["1130000000",{"mask":"nanp"}] | "(11) 3000-0000" | "11300-0000" |
phone.format#["1130000000",{"mask":"auto"}] | "(11) 3000-0000" | "11300-0000" |
phone.format#["(11) 3000-0000",{"mask":"nanp"}] | "(11) 3000-0000" | "11300-0000" |
phone.format#["1198888777",{"mask":"auto"}] | "(11) 9888-8777" | "11988-8877" |
phone.format#["11988887777",{"mask":"auto"}] | "(11) 98888-7777" | "11988-8877" |
phone.format#["0800 123 4567",{"mask":"e164"}] | "0800 123 4567" | "+5508001234567" |
phone.format#["+55 0800 123 4567",{"mask":"e164"}] | "0800 123 4567" | "+5508001234567" |
phone.format#["+55 0800 123 4567",{"mask":"international"}] | "0800 123 4567" | "+55 08 00123-4567" |
phone.format#["12345678",{"mask":"service"}] | "12345678" | "1234-5678" |
phone.format#["08001",{"mask":"service"}] | "0800 1" | "08001" |
phone.format#["0800123",{"mask":"service"}] | "0800 123" | "0800123" |
phone.format#["08001234",{"mask":"service"}] | "0800 123 4" | "0800-1234" |
phone.format#["40041",{"mask":"service"}] | "4004-1" | "40041" |
phone.format#["+55 11 98888-7777",{"mask":"auto"}] | "+55 11 98888-7777" | "55119-8888" |
phone.format#["+5511988887777",{"mask":"auto"}] | "+55 11 98888-7777" | "55119-8888" |
phone.format#["005511988887777",{"mask":"auto"}] | "+55 11 98888-7777" | "00551-1988" |
phone.format#["+55 11 3000-0000",{"mask":"auto"}] | "+55 11 3000-0000" | "55113-0000" |
phone.format#["08001234567",{"mask":"auto"}] | "0800 123 4567" | "08001-2345" |
phone.format#["03001234567",{"mask":"auto"}] | "0300 123 4567" | "03001-2345" |
phone.format#["40041234",{"mask":"auto"}] | "4004-1234" | "40041-234" |
phone.format#["30031234",{"mask":"auto"}] | "3003-1234" | "30031-234" |
phone.format#["55988887777",{"mask":"auto"}] | "(55) 98888-7777" | "55988-8877" |
phone.format#["08001234567",{"mask":"e164"}] | "0800 123 4567" | "+5508001234567" |
phone.format#["40041234",{"mask":"international"}] | "4004-1234" | "" |
phone.format#["11987654321",{"mask":"auto","obfuscate":true}] | "(11) *****-**21" | "11987-6543" |
phone.format#["08001234567",{"mask":"service","obfuscate":true}] | "0800 *** **67" | "0800 123 4567" |
phone.format#["11987654321",{"mask":"service","obfuscate":true}] | "***********" | "11987654321" |
phone.format#["11987654321",{"obfuscate":true}] | "*****-**43" | "11987-6543" |
phone.format#["988887766",{"obfuscate":true}] | "*****-**66" | "98888-7766" |
phone.format#[988887766,{"obfuscate":true}] | "*****-**66" | "98888-7766" |
phone.format#["11988887766",{"mask":"nanp","obfuscate":true}] | "(11) *****-**66" | "11988-8877" |
phone.format#["1130001234",{"mask":"nanp","obfuscate":true}] | "(11) ****-**34" | "11300-0123" |
phone.format#["1130001234",{"mask":"auto","obfuscate":true}] | "(11) ****-**34" | "11300-0123" |
phone.format#["988887766",{"mask":"auto","obfuscate":true}] | "*****-**66" | "98888-7766" |
phone.format#["1130001234",{"mask":"sn","obfuscate":true}] | "*****-**23" | "11300-0123" |
phone.format#["11988887766",{"mask":"international","obfuscate":true}] | "+55 11 *****-**66" | "+55 11 98888-7766" |
phone.format#["+55 11 3000-1234",{"mask":"international","obfuscate":true}] | "+55 11 ****-**34" | "+55 11 3000-1234" |
phone.format#["5511988887766",{"mask":"auto","obfuscate":true}] | "+55 11 *****-**66" | "55119-8888" |
phone.format#["11988887766",{"mask":"e164","obfuscate":true}] | "+5511*******66" | "+5511988887766" |
phone.format#["1130001234",{"mask":"e164","obfuscate":true}] | "+5511******34" | "+551130001234" |
phone.format#["03031234567",{"mask":"auto","obfuscate":true}] | "0303 *** **67" | "03031-2345" |
phone.format#["40041234",{"mask":"service","obfuscate":true}] | "4004-**34" | "4004-1234" |
phone.format#["30031234",{"mask":"auto","obfuscate":true}] | "3003-**34" | "30031-234" |
phone.format#["08001234567",{"mask":"e164","obfuscate":true}] | "0800 *** **67" | "+5508001234567" |
phone.format#["40041234",{"mask":"international","obfuscate":true}] | "4004-**34" | "" |
phone.format#["190",{"mask":"e164","obfuscate":true}] | "190" | "" |
phone.format#["190",{"obfuscate":true}] | "***" | "190" |
phone.format#["08",{"mask":"service","obfuscate":true}] | "**" | "08" |
phone.format#["1198",{"mask":"nanp","obfuscate":true}] | "(11) **" | "1198" |
phone.format#["11988",{"mask":"international","obfuscate":true}] | "+55 11 ***" | "" |
phone.format#["0800123",{"mask":"service","obfuscate":true}] | "0800 ***" | "0800123" |
phone.format#["119888877660000",{"mask":"e164","obfuscate":true}] | "+5511*******66" | "" |
phone.format#["11988887766",{"mask":"nanp","obfuscate":false}] | "(11) 98888-7766" | "11988-8877" |
phone.format#[-11987654321,{"mask":"auto"}] | "" | "11987-6543" |
phone.format#[9007199254740992] | "" | "90071-9925" |
phone.format#["+5511988887777"] | "11988-8877" | "55119-8888" |
phone.format#["+55 55 98888-7777"] | "55988-8877" | "55559-8888" |
phone.format#["+5511988887777",{"mask":"nanp"}] | "(11) 98888-7777" | "55119-8888" |
phone.format#["+5511987654321",{"mask":"nanp"}] | "(11) 98765-4321" | "55119-8765" |
phone.format#["+55 11 3000-0000",{"mask":"nanp"}] | "(11) 3000-0000" | "55113-0000" |
phone.format#["0055 11 98888-7777",{"mask":"nanp"}] | "(11) 98888-7777" | "00551-1988" |
phone.format#["+55 11 9",{"mask":"nanp"}] | "(11) 9" | "55119" |
phone.format#["+55",{"mask":"sn"}] | "" | "55" |
phone.format#["5511988887777",{"mask":"nanp"}] | "(55) 11988-8877" | "55119-8888" |
phone.format#["55988887777",{"mask":"nanp"}] | "(55) 98888-7777" | "55988-8877" |
phone.format#["+55",{"mask":"auto"}] | "" | "55" |
phone.format#["+55 11 9",{"mask":"e164"}] | "+55119" | "" |
phone.format#["+55 11 9",{"mask":"international"}] | "+55 11 9" | "" |
phone.format#["+55 11 9",{"mask":"auto"}] | "+55 11 9" | "55119" |
phone.format#["+55 11 98765",{"mask":"auto"}] | "+55 11 9876-5" | "55119-8765" |
phone.format#["+55 11 98765-4321",{"mask":"auto"}] | "+55 11 98765-4321" | "55119-8765" |
phone.format#["119888877660000",{"mask":"e164"}] | "+5511988887766" | "" |
phone.format#["119888877660000",{"mask":"international"}] | "+55 11 98888-7766" | "" |
phone.format#["+55 11 98888-7766 0000",{"mask":"e164"}] | "+5511988887766" | "" |
phone.format#["080",{"mask":"service","obfuscate":true}] | "***" | "080" |
phone.format#["987654321",{"obfuscate":true}] | "*****-**21" | "98765-4321" |
phone.format#["1130000000",{"mask":"auto","obfuscate":true}] | "(11) ****-**00" | "11300-0000" |
phone.format#["+5511987654321",{"mask":"auto","obfuscate":true}] | "+55 11 *****-**21" | "55119-8765" |
phone.format#["11987654321",{"mask":"e164","obfuscate":true}] | "+5511*******21" | "+5511987654321" |
phone.format#["11988887766",{"mask":"service","obfuscate":true}] | "***********" | "11988887766" |
phone.format#["+5511987654321",{"mask":"auto"}] | "+55 11 98765-4321" | "55119-8765" |
phone.generate#["service"] | null | "6856085786" |
phone.generate#["service"]~2 | null | "7536888343" |
phone.isValid#["+55 0800 123 4567",{"accept":["service"]}] | true | false |
phone.isValid#["0055 4004-1234",{"accept":["service"]}] | true | false |
phone.isValid#["5508001234567",{"accept":["service"]}] | true | false |
phone.isValid#["55 0300 123 4567",{"accept":["service"]}] | true | false |
phone.isValid#["(11) 98765-4321",{"accept":[]}] | false | true |
phone.isValid#["1130000000",{"accept":[]}] | false | true |
phone.isValid#["11987654321",{"accept":["landline"]}] | false | true |
phone.isValid#["1130000000",{"accept":["mobile"]}] | false | true |
phone.isValid#["11987654321",{"accept":["service"]}] | false | true |
phone.isValid#["11712345678",{"version":2}] | true | false |
phone.isValid#["11812345678",{"version":2}] | true | false |
phone.isValid#["11712345678",{"version":1}] | true | false |
phone.isValid#["08001234567",{"accept":["service"]}] | true | false |
phone.isValid#["40041234",{"accept":["service"]}] | true | false |
phone.isValid#["190",{"accept":["service"]}] | true | false |
phone.isValid#["0800 123 4567",{"accept":["service"]}] | true | false |
phone.isValid#["08001234567",{"accept":["mobile","landline","service"]}] | true | false |
phone.isValid#["112",{"accept":["service"]}] | true | false |
phone.isValid#["11 98765-4321x"] | false | true |
phone.isValid#["tel 1130000000"] | false | true |
phone.isValid#["11900000000",{"accept":[]}] | false | true |
phone.isValidLandline#["1162654321"] | true | false |
phone.isValidLandline#["(11) 6265-4321"] | true | false |
phone.isValidLandline#["tel 1130000000"] | false | true |
phone.isValidLandline#["(11) 3000-0000x"] | false | true |
phone.isValidMobile#["11712345678",{"version":2}] | true | false |
phone.isValidMobile#["11812345678",{"version":2}] | true | false |
phone.isValidMobile#["11701234567",{"version":2}] | true | false |
phone.isValidMobile#["11770012345",{"version":2}] | true | false |
phone.isValidMobile#["11712345678",{"version":1}] | true | false |
phone.isValidMobile#["11700123456",{"version":1}] | true | false |
phone.isValidMobile#["11700123456"] | true | false |
phone.isValidMobile#["11 98765-4321x"] | false | true |
phone.isValidMobile#["+55 11 98765-4321 a"] | false | true |
phone.isValidService#["101"] | false | true |
phone.isValidService#["110"] | false | true |
phone.isValidService#["189"] | false | true |
phone.isValidService#["112"] | true | false |
phone.isValidService#["abc190"] | false | true |
phone.isValidService#["0800 123 4567x"] | false | true |
phone.isValidService#["+55 0800 123 4567"] | true | false |
phone.isValidService#["+55 190"] | true | false |
phone.isValidService#["0055 4004-1234"] | true | false |
phone.isValidService#["5508001234567"] | true | false |
phone.parse#[-11988887777] | "" | "11988887777" |
phone.parse#["+55"] | "" | "55" |
phone.parse#["+55 11 9"] | "119" | "55119" |
phone.parse#["0055 (11) 98888"] | "1198888" | "00551198888" |
phone.parse#["+55 55 9"] | "559" | "55559" |
pis.format#["00000000000"] | "000.00000.00-0" | expected "000.00000.00-0", got null |
pis.format#[""] | "" | expected "", got null |
pis.format#["0"] | "0" | expected "0", got null |
pis.format#["00"] | "00" | expected "00", got null |
pis.format#["000"] | "000" | expected "000", got null |
pis.format#["0000"] | "000.0" | expected "000.0", got null |
pis.format#["00000"] | "000.00" | expected "000.00", got null |
pis.format#["000000"] | "000.000" | expected "000.000", got null |
pis.format#["0000000"] | "000.0000" | expected "000.0000", got null |
pis.format#["00000000"] | "000.00000" | expected "000.00000", got null |
pis.format#["000000000"] | "000.00000.0" | expected "000.00000.0", got null |
pis.format#["0000000000"] | "000.00000.00" | expected "000.00000.00", got null |
pis.format#["000000000000"] | "000.00000.00-0" | expected "000.00000.00-0", got null |
pis.format#["000.0"] | "000.0" | expected "000.0", got null |
pis.format#["000.00"] | "000.00" | expected "000.00", got null |
pis.format#["000.000"] | "000.000" | expected "000.000", got null |
pis.format#["000.0000"] | "000.0000" | expected "000.0000", got null |
pis.format#["000.00000"] | "000.00000" | expected "000.00000", got null |
pis.format#["000.000000"] | "000.00000.0" | expected "000.00000.0", got null |
pis.format#["000.00000.0"] | "000.00000.0" | expected "000.00000.0", got null |
pis.format#["000.00000.00"] | "000.00000.00" | expected "000.00000.00", got null |
pis.format#["000.00000.000"] | "000.00000.00-0" | expected "000.00000.00-0", got null |
pis.format#["000.00000.00-0"] | "000.00000.00-0" | expected "000.00000.00-0", got null |
pis.format#["000.00000.00-00"] | "000.00000.00-0" | expected "000.00000.00-0", got null |
pis.format#["000#Error*&@#0000#Char!00000"] | "000.00000.00-0" | expected "000.00000.00-0", got null |
pis.format#["#-+Error#000000000000#Char!"] | "000.00000.00-0" | expected "000.00000.00-0", got null |
pis.format#["000000#+_Error#Char!$#000000"] | "000.00000.00-0" | expected "000.00000.00-0", got null |
pis.format#[1] | "1" | expected "1", got null |
pis.format#[10] | "10" | expected "10", got null |
pis.format#[100] | "100" | expected "100", got null |
pis.format#[1000] | "100.0" | expected "100.0", got null |
pis.format#[10000] | "100.00" | expected "100.00", got null |
pis.format#[100000] | "100.000" | expected "100.000", got null |
pis.format#[1000000] | "100.0000" | expected "100.0000", got null |
pis.format#[10000000] | "100.00000" | expected "100.00000", got null |
pis.format#[100000000] | "100.00000.0" | expected "100.00000.0", got null |
pis.format#[1000000000] | "100.00000.00" | expected "100.00000.00", got null |
pis.format#[10000000000] | "100.00000.00-0" | expected "100.00000.00-0", got null |
pis.format#[100000000000] | "100.00000.00-0" | expected "100.00000.00-0", got null |
pis.format#[1000000000000] | "100.00000.00-0" | expected "100.00000.00-0", got null |
pis.format#[100.1] | "" | expected "", got null |
pis.format#[100.11] | "" | expected "", got null |
pis.format#[100.101] | "" | expected "", got null |
pis.format#[100.1001] | "" | expected "", got null |
pis.format#[100.10001] | "" | expected "", got null |
pis.format#[100.100001] | "" | expected "", got null |
pis.format#[100.1000001] | "" | expected "", got null |
pis.format#[100.10000001] | "" | expected "", got null |
pis.format#[100.100000001] | "" | expected "", got null |
pis.format#["0000000000000"] | "000.00000.00-0" | expected "000.00000.00-0", got null |
pis.format#["00000000000000"] | "000.00000.00-0" | expected "000.00000.00-0", got null |
pis.format#["000000000000000"] | "000.00000.00-0" | expected "000.00000.00-0", got null |
pis.format#[-12345678901] | "" | expected "", got null |
pis.format#[9007199254740992] | "" | expected "", got null |
pis.format#["12345678901"] | "123.45678.90-1" | expected "123.45678.90-1", got null |
pis.isValid#["120.5641.284-7"] | true | false |
pis.isValid#["120/56874/10-7"] | true | false |
pis.isValid#["120 56874 10 7"] | true | false |
pis.isValid#["120.1213.266-0"] | true | false |
pis.isValid#["120.7041.469-0"] | true | false |
pis.parse#[-1] | "" | "1" |
pixKey.getInfo#["fulano@example"] | {"type":"email","value":"fulano@example"} | expected {"type":"email","value":"fulano@example"}, got null |
pixKey.getInfo#["abc(11) 98765-4321xyz"] | null | {"type":"phone","value":"+5511987654321"} |
pixKey.getInfo#["tel: (11) 98765-4321"] | null | {"type":"phone","value":"+5511987654321"} |
pixKey.getInfo#["abc123.456.789-09"] | null | {"type":"cpf","value":"12345678909"} |
pixKey.getInfo#["CPF 123.456.789-09"] | null | {"type":"cpf","value":"12345678909"} |
pixKey.getInfo#["1.2.3.4.5.6.7.8.9.0.9"] | null | {"type":"cpf","value":"12345678909"} |
pixKey.getInfo#["12ABC34501DE35"] | {"type":"cnpj","value":"12ABC34501DE35"} | expected {"type":"cnpj","value":"12ABC34501DE35"}, got null |
pixKey.getInfo#["12.abc.345/01de-35"] | {"type":"cnpj","value":"12ABC34501DE35"} | expected {"type":"cnpj","value":"12ABC34501DE35"}, got null |
pixKey.getInfo#["005511987654321"] | {"type":"phone","value":"+5511987654321"} | expected {"type":"phone","value":"+5511987654321"}, got null |
pixKey.getInfo#["11987654321"] | {"type":"phone","value":"+5511987654321"} | expected {"type":"phone","value":"+5511987654321"}, got null |
pixKey.getInfo#["5511987654321"] | {"type":"phone","value":"+5511987654321"} | expected {"type":"phone","value":"+5511987654321"}, got null |
pixKey.getInfo#["a&b@example.com"] | null | {"type":"email","value":"a&b@example.com"} |
pixKey.getInfo#["Fulano@Example"] | {"type":"email","value":"fulano@example"} | expected {"type":"email","value":"fulano@example"}, got null |
pixKey.getInfo#["a@localhost"] | {"type":"email","value":"a@localhost"} | expected {"type":"email","value":"a@localhost"}, got null |
pixKey.getInfo#["a@bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.com"] | null | {"type":"email","value":"a@bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.com"} |
pixKey.getInfo#["fulano@example.com."] | null | {"type":"email","value":"fulano@example.com."} |
pixKey.getInfo#["fulano@exa_mple.com"] | null | {"type":"email","value":"fulano@exa_mple.com"} |
pixKey.getInfo#["ful%ano@example.com"] | null | {"type":"email","value":"ful%ano@example.com"} |
pixKey.getInfo#["\"fulano\"@example.com"] | null | {"type":"email","value":"\"fulano\"@example.com"} |
pixKey.getInfo#["1234/56789/09"] | null | {"type":"cpf","value":"12345678909"} |
pixKey.isValid#email-without-tld | true | false |
pixKey.isValid#["12ABC34501DE35"] | true | false |
pixKey.isValid#["123.456.789-09",{"accept":["email","evp"]}] | false | true |
pixKey.isValid#["123.456.789-09",{"accept":[]}] | false | true |
pixKey.isValid#["a&b@example.com"] | false | true |
pixKey.isValid#["a@localhost"] | true | false |
pixKey.isValid#["a{b}@example.com",{"accept":["evp","cpf"]}] | false | true |
pixKey.isValid#["1234/56789/09"] | false | true |
pixKey.isValid#["123.456.789-09",null] | true | expected true, threw: NoMethodError: undefined method `[]' for nil |
pixKey.isValid#["fulano@example.com",{"accept":["cpf"]}] | false | true |
pixPayload.generate#[{"key":"71c7d9be-4b85-4e43-9f1c-1f3b8b4e9a2d","merchantName":" ","merchantCity":"Brasilia"}] | null | "00020101021126580014br.gov.bcb.pix013671c7d9be-4b85-4e43-9f1c-1f3b8b4e9a2d5204000053039865802BR5903 6008Brasilia62070503***63046244" |
pixPayload.generate#[{"key":"71c7d9be-4b85-4e43-9f1c-1f3b8b4e9a2d","merchantName":"💸","merchantCity":"Brasilia"}] | null | "00020101021126580014br.gov.bcb.pix013671c7d9be-4b85-4e43-9f1c-1f3b8b4e9a2d5204000053039865802BR5901💸6008Brasilia62070503***6304961B" |
pixPayload.generate#[{"key":"71c7d9be-4b85-4e43-9f1c-1f3b8b4e9a2d","merchantName":"Fulano","merchantCity":" "}] | null | "00020101021126580014br.gov.bcb.pix013671c7d9be-4b85-4e43-9f1c-1f3b8b4e9a2d5204000053039865802BR5906Fulano6001 62070503***63046078" |
pixPayload.generate#[{"key":"123e4567-e12b-12d1-a456-426655440000","merchantName":"Fulano de Tal","merchantCity":"BRASILIA"}] | "00020126580014br.gov.bcb.pix0136123e4567-e12b-12d1-a456-4266554400005204000053039865802BR5913Fulano de Tal6008BRASILIA62070503***63041D3D" | "00020101021126580014br.gov.bcb.pix0136123e4567-e12b-12d1-a456-4266554400005204000053039865802BR5913Fulano de Tal6008BRASILIA62070503***630448CD" |
pixPayload.generate#[{"key":"a&b@example.com","merchantName":"Fulano","merchantCity":"Brasilia"}] | null | "00020101021126370014br.gov.bcb.pix0115a&b@example.com5204000053039865802BR5906Fulano6008Brasilia62070503***6304D373" |
pixPayload.generate#[{"key":"a{b}@example.com","merchantName":"Fulano","merchantCity":"Brasilia"}] | "00020126380014br.gov.bcb.pix0116a{b}@example.com5204000053039865802BR5906Fulano6008Brasilia62070503***63049AB3" | "00020101021126380014br.gov.bcb.pix0116a{b}@example.com5204000053039865802BR5906Fulano6008Brasilia62070503***6304FBAF" |
pixPayload.generate#[{"key":"123.456.789-09","merchantName":"Fulano de Tal","merchantCity":"Brasília","amount":123.45}] | "00020126330014br.gov.bcb.pix0111123456789095204000053039865406123.455802BR5913Fulano de Tal6008Brasilia62070503***630479EE" | "00020101021126330014br.gov.bcb.pix0111123456789095204000053039865406123.455802BR5913Fulano de Tal6008Brasilia62070503***63046F8F" |
pixPayload.generate#[{"url":"pix.example.com/qr/v2/1234","merchantName":"Fulano de Tal","merchantCity":"Brasília"}] | "00020101021226480014br.gov.bcb.pix2526pix.example.com/qr/v2/12345204000053039865802BR5913Fulano de Tal6008Brasilia62070503***6304FC66" | "00020101021226480014br.gov.bcb.pix2526pix.example.com/qr/v2/12345204000053039865802BR5913Fulano de Tal6008Brasilia6304FF83" |
pixPayload.generate#[{"key":"71c7d9be-4b85-4e43-9f1c-1f3b8b4e9a2d","merchantName":"João da Silva Sauro Júnior Segundo","merchantCity":"São José dos Campos do Sul"}] | "00020126580014br.gov.bcb.pix013671c7d9be-4b85-4e43-9f1c-1f3b8b4e9a2d5204000053039865802BR5925Joao da Silva Sauro Junio6015Sao Jose dos Ca62070503***63047E1C" | "00020101021126580014br.gov.bcb.pix013671c7d9be-4b85-4e43-9f1c-1f3b8b4e9a2d5204000053039865802BR5925Joao da Silva Sauro Junio6015Sao Jose dos Ca62070503***63040295" |
pixPayload.generate#[{"key":"71c7d9be-4b85-4e43-9f1c-1f3b8b4e9a2d","merchantName":"Ação Ñandú","merchantCity":"Brasília"}] | "00020126580014br.gov.bcb.pix013671c7d9be-4b85-4e43-9f1c-1f3b8b4e9a2d5204000053039865802BR5910Acao Nandu6008Brasilia62070503***630495AE" | "00020101021126580014br.gov.bcb.pix013671c7d9be-4b85-4e43-9f1c-1f3b8b4e9a2d5204000053039865802BR5910Acao Nandu6008Brasilia62070503***63049F26" |
pixPayload.generate#[{"key":"71c7d9be-4b85-4e43-9f1c-1f3b8b4e9a2d","merchantName":"Fulano","merchantCity":"Brasília","amount":10.5,"txid":"PEDIDO42"}] | "00020126580014br.gov.bcb.pix013671c7d9be-4b85-4e43-9f1c-1f3b8b4e9a2d520400005303986540510.505802BR5906Fulano6008Brasilia62120508PEDIDO42630418B1" | "00020101021126580014br.gov.bcb.pix013671c7d9be-4b85-4e43-9f1c-1f3b8b4e9a2d520400005303986540510.505802BR5906Fulano6008Brasilia62120508PEDIDO4263041A3D" |
pixPayload.generate#[{"key":"71c7d9be-4b85-4e43-9f1c-1f3b8b4e9a2d","merchantName":"Fulano","merchantCity":"Brasília","txid":"AAAAAAAAAAAAAAAAAAAAAAAAA"}] | "00020126580014br.gov.bcb.pix013671c7d9be-4b85-4e43-9f1c-1f3b8b4e9a2d5204000053039865802BR5906Fulano6008Brasilia62290525AAAAAAAAAAAAAAAAAAAAAAAAA6304F4F8" | "00020101021126580014br.gov.bcb.pix013671c7d9be-4b85-4e43-9f1c-1f3b8b4e9a2d5204000053039865802BR5906Fulano6008Brasilia62290525AAAAAAAAAAAAAAAAAAAAAAAAA630482CC" |
pixPayload.generate#[{"key":"71c7d9be-4b85-4e43-9f1c-1f3b8b4e9a2d","merchantName":"Fulano","merchantCity":"Brasília","description":"Pagamento do pedido"}] | "00020126810014br.gov.bcb.pix013671c7d9be-4b85-4e43-9f1c-1f3b8b4e9a2d0219Pagamento do pedido5204000053039865802BR5906Fulano6008Brasilia62070503***6304B302" | "00020101021126580014br.gov.bcb.pix013671c7d9be-4b85-4e43-9f1c-1f3b8b4e9a2d5204000053039865802BR5906Fulano6008Brasilia62300503***0219Pagamento do pedido63047952" |
pixPayload.generate#[{"key":"71c7d9be-4b85-4e43-9f1c-1f3b8b4e9a2d","merchantName":"Fulano","merchantCity":"Brasília","amount":0.30000000000000004}] | "00020126580014br.gov.bcb.pix013671c7d9be-4b85-4e43-9f1c-1f3b8b4e9a2d52040000530398654040.305802BR5906Fulano6008Brasilia62070503***6304964E" | expected "00020126580014br.gov.bcb.pix013671c7d9be-4b85-4e43-9f1c-1f3b8b4e9a2d52040000530398654040.305802BR5906Fulano6008Brasilia62070503***6304964E", got null |
pixPayload.generate#[{"url":"https://pix.example.com/qr/v2/1234","merchantName":"Fulano","merchantCity":"Brasília"}] | null | "00020101021226480014br.gov.bcb.pix2526pix.example.com/qr/v2/12345204000053039865802BR5906Fulano6008Brasilia6304591A" |
pixPayload.generate#[{"url":"pix.example.com/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","merchantName":"Fulano","merchantCity":"Brasília"}] | "00020101021226990014br.gov.bcb.pix2577pix.example.com/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa5204000053039865802BR5906Fulano6008Brasilia62070503***63041C95" | "00020101021226990014br.gov.bcb.pix2577pix.example.com/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa5204000053039865802BR5906Fulano6008Brasilia63049840" |
pixPayload.generate#[{"key":"71c7d9be-4b85-4e43-9f1c-1f3b8b4e9a2d","merchantName":"Fulano","merchantCity":"Brasília","amount":99999999999.99}] | null | "00020101021126580014br.gov.bcb.pix013671c7d9be-4b85-4e43-9f1c-1f3b8b4e9a2d520400005303986541499999999999.995802BR5906Fulano6008Brasilia62070503***63041AAF" |
pixPayload.getInfo#with-amount-and-txid | null | {"merchantName":"Alexandre Lima","merchantCity":"Presidente Prudente","pointOfInitiation":"static","key":"bee05743-4291-4f3c-9259-595df1307ba1","amount":10,"txid":"Um-Id-Qualquer"} |
pixPayload.getInfo#["00020101021226470014br.gov.bcb.pix2525https://pix.example.com/x5204000053039865802BR5901A6001B62070503***6304F843"] | null | {"merchantName":"A","merchantCity":"B","pointOfInitiation":"dynamic","url":"https://pix.example.com/x"} |
pixPayload.getInfo#["00020101021226390014br.gov.bcb.pix2517pix example.com/x5204000053039865802BR5901A6001B62070503***6304C8E4"] | null | {"merchantName":"A","merchantCity":"B","pointOfInitiation":"dynamic","url":"pix example.com/x"} |
pixPayload.getInfo#["00020101021226330014br.gov.bcb.pix2511localhost/x5204000053039865802BR5901A6001B62070503***630494D9"] | null | {"merchantName":"A","merchantCity":"B","pointOfInitiation":"dynamic","url":"localhost/x"} |
pixPayload.getInfo#["00020104141234567890123426580014BR.GOV.BCB.PIX0136123e4567-e12b-12d1-a456-42665544000027300012BR.COM.OUTRO011001234567895204000053039865406123.455802BR5917NOME DO RECEBEDOR6008BRASILIA61087007490062190515RP12345678-201980390012BR.COM.OUTRO01190123.ABCD.3456.WXYZ6304AD38"] | null | {"merchantName":"NOME DO RECEBEDOR","merchantCity":"BRASILIA","pointOfInitiation":"static","key":"123e4567-e12b-12d1-a456-426655440000","amount":123.45,"txid":"RP12345678-2019"} |
pixPayload.getInfo#["00020126700014br.gov.bcb.pix0136123e4567-e12b-12d1-a456-426655440000030812345678520400005303986540550.005802BR5913Fulano de Tal6008BRASILIA62070503***630419A4"] | {"merchantName":"Fulano de Tal","merchantCity":"BRASILIA","pointOfInitiation":"static","key":"123e4567-e12b-12d1-a456-426655440000","withdrawalFacilitator":"12345678","amount":50} | {"merchantName":"Fulano de Tal","merchantCity":"BRASILIA","pointOfInitiation":"static","key":"123e4567-e12b-12d1-a456-426655440000","amount":50} |
pixPayload.getInfo#["00020126480014br.gov.bcb.pix2526pix.example.com/qr/v2/123452040000530398654040.005802BR5913Fulano de Tal6008BRASILIA62070503***6304A029"] | {"merchantName":"Fulano de Tal","merchantCity":"BRASILIA","pointOfInitiation":"dynamic","url":"pix.example.com/qr/v2/1234"} | expected {"merchantName":"Fulano de Tal","merchantCity":"BRASILIA","pointOfInitiation":"dynamic","url":"pix.example.com/qr/v2/1234"}, got null |
pixPayload.getInfo#["00020126560014br.gov.bcb.pix0111123456789090219Pagamento do pedido5204000053039865802BR5913Fulano de Tal6008BRASILIA62070503***63041B76"] | {"merchantName":"Fulano de Tal","merchantCity":"BRASILIA","pointOfInitiation":"static","key":"12345678909","description":"Pagamento do pedido"} | {"merchantName":"Fulano de Tal","merchantCity":"BRASILIA","pointOfInitiation":"static","key":"12345678909"} |
pixPayload.getInfo#["00020126580014br.gov.bcb.pix0136123e4567-e12b-12d1-a456-4266554400005204000053039865802BR5913Fulano de Tal6008BRASILIA6304740C"] | null | {"merchantName":"Fulano de Tal","merchantCity":"BRASILIA","pointOfInitiation":"static","key":"123e4567-e12b-12d1-a456-426655440000"} |
pixPayload.getInfo#["00020126330014br.gov.bcb.pix0111123456789095204000053039865802BR5913Fulano de Tal6008BRASILIA62190515RP12345678-201963049060"] | null | {"merchantName":"Fulano de Tal","merchantCity":"BRASILIA","pointOfInitiation":"static","key":"12345678909","txid":"RP12345678-2019"} |
pixPayload.getInfo#["00020126360014br.gov.bcb.pix0114123.456.789-095204000053039865802BR5913Fulano de Tal6008BRASILIA62070503***6304B354"] | null | {"merchantName":"Fulano de Tal","merchantCity":"BRASILIA","pointOfInitiation":"static","key":"123.456.789-09"} |
pixPayload.getInfo#["00020126330014br.gov.bcb.pix0111123456789095204000053039865802BR5913Fulano de Tal6019Presidente Prudente62070503***63040E59"] | null | {"merchantName":"Fulano de Tal","merchantCity":"Presidente Prudente","pointOfInitiation":"static","key":"12345678909"} |
pixPayload.getInfo#["00020126580014br.gov.bcb.pix0136123e4567-e12b-12d1-a456-4266554400005204000053039865802BR5913Fulano de Tal6008BRASILIA62070503***5903abc63045B77"] | null | {"merchantName":"Fulano de Tal","merchantCity":"BRASILIA","pointOfInitiation":"static","key":"123e4567-e12b-12d1-a456-426655440000"} |
pixPayload.isValid#with-amount-and-txid | false | true |
pixPayload.isValid#["00020104141234567890123426580014BR.GOV.BCB.PIX0136123e4567-e12b-12d1-a456-42665544000027300012BR.COM.OUTRO011001234567895204000053039865406123.455802BR5917NOME DO RECEBEDOR6008BRASILIA61087007490062190515RP12345678-201980390012BR.COM.OUTRO01190123.ABCD.3456.WXYZ6304AD38"] | false | true |
pixPayload.isValid#["00020126580014br.gov.bcb.pix0136123e4567-e12b-12d1-a456-4266554400005204000053039865802BR5913Fulano de Tal6008BRASILIA6304740C"] | false | true |
pixPayload.isValid#["00020126700014br.gov.bcb.pix0136123e4567-e12b-12d1-a456-42665544000003081234567852040000530398654040.005802BR5913Fulano de Tal6008BRASILIA62070503***63043A07"] | true | false |
pixPayload.isValid#["00020126580014br.gov.bcb.pix0136123e4567-e12b-12d1-a456-4266554400005204000053038405802BR5913Fulano de Tal6008BRASILIA62070503***63040C88"] | false | true |
pixPayload.isValid#["00020126580014br.gov.bcb.pix0136123e4567-e12b-12d1-a456-42665544000052040000530398654061R3.455802BR5913Fulano de Tal6008BRASILIA62070503***63049FEF"] | false | true |
pixPayload.isValid#["00020126360014br.gov.bcb.pix0114123.456.789-095204000053039865802BR5913Fulano de Tal6008BRASILIA62070503***6304B354"] | false | true |
pixPayload.isValid#["00020126400014br.gov.bcb.pix0118Fulano@Example.com5204000053039865802BR5913Fulano de Tal6008BRASILIA62070503***63049F84"] | false | true |
pixPayload.isValid#["00020126370014br.gov.bcb.pix0115a&b@example.com5204000053039865802BR5913Fulano de Tal6008BRASILIA62070503***6304E129"] | false | true |
pixPayload.isValid#["00020126480014br.gov.bcb.pix2526pix.example.com/qr/v2/123452040000530398654040.005802BR5913Fulano de Tal6008BRASILIA62070503***6304A029"] | true | false |
pixPayload.isValid#["00020126580014br.gov.bcb.pix0136123e4567-e12b-12d1-a456-426655440000520400005303986540698.7355802BR5913Fulano de Tal6008BRASILIA62070503***63047FD6"] | false | true |
pixPayload.isValid#["00020126580014br.gov.bcb.pix0136123e4567-e12b-12d1-a456-426655440000520400005303986541499999999999.995802BR5913Fulano de Tal6008BRASILIA62070503***630498EF"] | false | true |
pixPayload.isValid#["00020126330014br.gov.bcb.pix0111123456789095204000053039865802BR5913Fulano de Tal6008BRASILIA62070103***630476F6"] | false | true |
pixPayload.isValid#["00020126330014br.gov.bcb.pix0111123456789095204000053039865802BR5913Fulano de Tal6008BRASILIA62300526AAAAAAAAAAAAAAAAAAAAAAAAAA6304E639"] | false | true |
pixPayload.isValid#["00020126330014br.gov.bcb.pix0111123456789095204000053039865802BR5913Fulano de Tal6008BRASILIA62190515RP12345678-201963049060"] | false | true |
pixPayload.isValid#["00020126330014br.gov.bcb.pix0111123456789095204000053039865802BR5913Fulano de Tal6008BRASILIA62130509pedido_426304FF3C"] | false | true |
pixPayload.isValid#["00020126330014br.gov.bcb.pix0111123456789095204000053039865802BR5926AAAAAAAAAAAAAAAAAAAAAAAAAA6008BRASILIA62070503***63042185"] | false | true |
pixPayload.isValid#["00020126330014br.gov.bcb.pix0111123456789095204000053039865802BR5913Fulano de Tal6019Presidente Prudente62070503***63040E59"] | false | true |
pixPayload.isValid#["00020126580014br.gov.bcb.pix0136123e4567-e12b-12d1-a456-4266554400005204000053039865802BR5913Fulano de Tal6008BRASILIA62070503***61006304A8F7"] | false | true |
pixPayload.isValid#["00020126580014br.gov.bcb.pix0136123e4567-e12b-12d1-a456-4266554400005204000053039865802BR5913Fulano de Tal6008BRASILIA62070503***5903abc63045B77"] | false | true |
pixPayload.isValid#["00020126580014br.gov.bcb.pix0136123e4567-e12b-12d1-a456-4266554400005204000053039865802BR5913Fulano de Tal6008BRASILIA62070503***5913Fulano de Tal6304B1C1"] | false | true |
pixPayload.isValid#["00020126580014br.gov.bcb.pix0136123e4567-e12b-12d1-a456-4266554400005204000053039865802BR5913Fulano de Tal6008BRASILIA62070503***6304AAAA63047C97"] | false | true |
pixPayload.isValid#[" 00020126580014br.gov.bcb.pix0136123e4567-e12b-12d1-a456-4266554400005204000053039865802BR5913Fulano de Tal6008BRASILIA62070503***63041D3D "] | true | false |
registroProfissional.isValid#[{"value":"123456-RJ","council":"OAB","stateCode":"SP"}] | false | true |
registroProfissional.isValid#[{"value":"2412345","council":"CRP"}] | true | false |
registroProfissional.isValid#[{"value":"SP-123456/O-3 T-MG","council":"CRC","stateCode":"MG"}] | false | true |
registroProfissional.isValid#[{"value":"CRO-SP 12345","council":"CRO","stateCode":"SP"}] | true | false |
registroProfissional.isValid#[{"value":"CRO-SP-TPD 1234","council":"CRO","stateCode":"SP"}] | true | false |
registroProfissional.isValid#[{"value":"CRO-SP-TSB 1234","council":"CRO","stateCode":"SP"}] | true | false |
registroProfissional.isValid#[{"value":"CRO-SP-ASB 1234","council":"CRO","stateCode":"SP"}] | true | false |
registroProfissional.isValid#[{"value":"CRO-SP-APD 1234","council":"CRO","stateCode":"SP"}] | true | false |
registroProfissional.isValid#[{"value":"CRO-SP-CLM 1234","council":"CRO","stateCode":"SP"}] | true | false |
registroProfissional.isValid#[{"value":"CRO-SP-CLF 1234","council":"CRO","stateCode":"SP"}] | true | false |
registroProfissional.isValid#[{"value":"CRO-SP-LPM 1234","council":"CRO","stateCode":"SP"}] | true | false |
registroProfissional.isValid#[{"value":"CRO-SP-LPF 1234","council":"CRO","stateCode":"SP"}] | true | false |
registroProfissional.isValid#[{"value":"CRO-SP-PV 1234","council":"CRO","stateCode":"SP"}] | true | false |
registroProfissional.isValid#[{"value":"CRO-SP-T 1234","council":"CRO","stateCode":"SP"}] | true | false |
registroProfissional.isValid#[{"value":"CRO-SP 12345-IS","council":"CRO","stateCode":"SP"}] | true | false |
registroProfissional.isValid#[{"value":"CRO-SP-TSB 1234-IS","council":"CRO","stateCode":"SP"}] | true | false |
registroProfissional.isValid#[{"value":"CRO-SP 12345-R","council":"CRO","stateCode":"SP"}] | true | false |
registroProfissional.isValid#[{"value":"CRO-SP-TPD 1234-R","council":"CRO","stateCode":"SP"}] | true | false |
registroProfissional.isValid#[{"value":"CRO-SP-TPD 1234-IS","council":"CRO"}] | true | false |
registroProfissional.isValid#[{"value":"123.456-SP","council":"OAB"}] | true | false |
registroProfissional.isValid#[{"value":" 123456 / SP ","council":"OAB"}] | true | false |
registroProfissional.isValid#[{"value":"CRO-SP-TPD 1234","council":"CRO"}] | true | false |
renavam.isValid#["0063988/4962"] | true | false |
renavam.isValid#["639884962"] | true | false |
renavam.isValid#[639884962] | true | false |
renavam.isValid#["0063988.4962"] | true | false |
renavam.isValid#["00639884-962"] | true | false |
renavam.isValid#[" 00639884962 "] | true | false |
renavam.isValid#[12345678900] | true | false |
state.getByIbgeCode#["35/SP"] | {"code":"SP","name":"São Paulo","regionCode":"SE","regionName":"Sudeste","ibgeCode":35} | expected {"code":"SP","name":"São Paulo","regionCode":"SE","regionName":"Sudeste","ibgeCode":35}, got null |
text.capitalize#["pão com manteiga"] | "Pão com Manteiga" | "Pão Com Manteiga" |
text.capitalize#["doc da empresa ab",{"upperCaseWords":["DOC","AB"]}] | "DOC da Empresa AB" | "Doc da Empresa Ab" |
text.capitalize#["doc inválido",{"upperCaseWords":["DOC"]}] | "DOC Inválido" | "Doc Inválido" |
text.capitalize#["josé Ama MARIA",{"lowerCaseWords":["ama"]}] | "José ama Maria" | "José Ama Maria" |
text.capitalize#["josé Não Ama MARIA",{"lowerCaseWords":["não","ama"]}] | "José não ama Maria" | "José Não Ama Maria" |
text.capitalize#["meu cpf e rg",{"upperCaseWords":["CPF","Rg"]}] | "Meu CPF e RG" | "Meu Cpf e Rg" |
text.capitalize#["padaria e confeitaria me"] | "Padaria e Confeitaria ME" | "Padaria e Confeitaria Me" |
text.capitalize#["meu cpf e rg"] | "Meu CPF e RG" | "Meu Cpf e Rg" |
text.capitalize#["cep 01310-100"] | "CEP 01310-100" | "Cep 01310-100" |
text.capitalize#["santana/rs"] | "Santana/RS" | "Santana/Rs" |
text.capitalize#["porto alegre/rs"] | "Porto Alegre/RS" | "Porto Alegre/Rs" |
text.capitalize#["são paulo/sp"] | "São Paulo/SP" | "São Paulo/Sp" |
text.capitalize#["santa bárbara d'oeste"] | "Santa Bárbara d'Oeste" | "Santa Bárbara D'Oeste" |
text.capitalize#["SANTA BÁRBARA D'OESTE"] | "Santa Bárbara d'Oeste" | "Santa Bárbara D'Oeste" |
text.capitalize#["joão d’ávila"] | "João d’Ávila" | "João D’Ávila" |
text.capitalize#["bob's"] | "Bob's" | "Bob'S" |
text.capitalize#["habib's"] | "Habib's" | "Habib'S" |
text.capitalize#["mc donald's"] | "Mc Donald's" | "Mc Donald'S" |
text.capitalize#["x'd"] | "X'd" | "X'D" |
text.capitalize#["d'oeste"] | "d'Oeste" | "D'Oeste" |
text.capitalize#["dias d'ávila"] | "Dias d'Ávila" | "Dias D'Ávila" |
text.capitalize#["olho d'água do piauí"] | "Olho d'Água do Piauí" | "Olho D'Água do Piauí" |
text.capitalize#["maria e--joão"] | "Maria e--João" | "Maria E--João" |
text.capitalize#["luiz von schmidt"] | "Luiz von Schmidt" | "Luiz Von Schmidt" |
text.capitalize#["são joão del rei"] | "São João del Rei" | "São João Del Rei" |
text.capitalize#["fulano comércio me"] | "Fulano Comércio ME" | "Fulano Comércio Me" |
text.capitalize#["fulano me epp"] | "Fulano ME EPP" | "Fulano Me EPP" |
text.capitalize#["fulano ltda me"] | "Fulano LTDA ME" | "Fulano LTDA Me" |
text.capitalize#["diga-me a verdade"] | "Diga-Me a Verdade" | "Diga-Me A Verdade" |
text.capitalize#["me"] | "ME" | "Me" |
text.capitalize#["envie-me, cpf"] | "Envie-Me, CPF" | "Envie-Me, Cpf" |
text.capitalize#["dê-me a mão"] | "Dê-Me a Mão" | "Dê-Me A Mão" |
text.capitalize#["fulano, me"] | "Fulano, ME" | "Fulano, Me" |
text.capitalize#["fulano/me"] | "Fulano/ME" | "Fulano/Me" |
text.capitalize#["fulano d’me"] | "Fulano d’Me" | "Fulano D’Me" |
text.capitalize#["fulano d‘me"] | "Fulano d‘Me" | "Fulano D‘Me" |
text.capitalize#["fulano me cpf"] | "Fulano Me CPF" | "Fulano Me Cpf" |
text.capitalize#["fulano me s/a"] | "Fulano ME S/A" | "Fulano Me S/A" |
text.capitalize#["fulano me s.a."] | "Fulano ME S.A." | "Fulano Me S.A." |
text.capitalize#["fulano me epp ltda"] | "Fulano ME EPP LTDA" | "Fulano Me EPP LTDA" |
text.capitalize#["fulano me epp",{"upperCaseWords":["ME"]}] | "Fulano Me Epp" | "Fulano Me EPP" |
text.capitalize#["fulano me",{"upperCaseWords":["ME"]}] | "Fulano ME" | "Fulano Me" |
text.capitalize#["maria van der berg"] | "Maria van der Berg" | "Maria Van Der Berg" |
text.capitalize#["carlo di giovanni"] | "Carlo di Giovanni" | "Carlo Di Giovanni" |
text.capitalize#["joão paulo ii"] | "João Paulo II" | "João Paulo Ii" |
text.capitalize#["rua xv de novembro"] | "Rua XV de Novembro" | "Rua Xv de Novembro" |
text.capitalize#["avenida papa joão xxiii"] | "Avenida Papa João XXIII" | "Avenida Papa João Xxiii" |
text.capitalize#["empresa ltda",{"upperCaseWords":[]}] | "Empresa Ltda" | "Empresa LTDA" |
text.capitalize#["jose da silva",{"lowerCaseWords":[]}] | "Jose Da Silva" | "Jose da Silva" |
text.capitalize#["santana/rs",{"upperCaseWords":[]}] | "Santana/RS" | "Santana/Rs" |
text.capitalize#["SANTANA/RS"] | "Santana/RS" | "Santana/Rs" |
text.capitalize#["SANTANA/RS",{"upperCaseWords":["rs"]}] | "Santana/RS" | "Santana/Rs" |
text.capitalize#["rio-de-janeiro"] | "Rio-de-Janeiro" | "Rio-De-Janeiro" |
text.capitalize#["i̇stanbul"] | "İstanbul" | "İStanbul" |
text.capitalize#["ßa"] | "ßa" | "SSa" |
text.capitalize#["fim"] | "fim" | "FIm" |
text.capitalize#["brasília - df"] | "Brasília - DF" | "Brasília - Df" |
text.capitalize#["são paulo – sp"] | "São Paulo – SP" | "São Paulo – Sp" |
text.capitalize#["curitiba, pr"] | "Curitiba, PR" | "Curitiba, Pr" |
text.capitalize#["rua x, 10, centro, recife - pe"] | "Rua X, 10, Centro, Recife - PE" | "Rua X, 10, Centro, Recife - Pe" |
text.capitalize#["BRASÍLIA - DF",{"upperCaseWords":[]}] | "Brasília - DF" | "Brasília - Df" |
text.capitalize#["recife - PE"] | "Recife - PE" | "Recife - Pe" |
text.capitalize#["rua xxiv de maio"] | "Rua XXIV de Maio" | "Rua Xxiv de Maio" |
text.capitalize#["rua xxv de março"] | "Rua XXV de Março" | "Rua Xxv de Março" |
text.capitalize#["praça xxix de junho"] | "Praça XXIX de Junho" | "Praça Xxix de Junho" |
text.capitalize#["rua xxxi de março"] | "Rua XXXI de Março" | "Rua Xxxi de Março" |
text.capitalize#["capítulo xxxix"] | "Capítulo XXXIX" | "Capítulo Xxxix" |
text.capitalize#["rua xxiii"] | "Rua XXIII" | "Rua Xxiii" |
text.capitalize#["eu li o livro"] | "Eu Li o Livro" | "Eu Li O Livro" |
text.capitalize#["casa para todos"] | "Casa para Todos" | "Casa Para Todos" |
text.capitalize#["ASSOCIAÇÃO AO LADO"] | "Associação ao Lado" | "Associação Ao Lado" |
text.capitalize#["banco às margens"] | "Banco às Margens" | "Banco Às Margens" |
text.capitalize#["carta pelo correio"] | "Carta pelo Correio" | "Carta Pelo Correio" |
text.capitalize#["vista sobre o mar"] | "Vista sobre o Mar" | "Vista Sobre O Mar" |
text.capitalize#["ponte sob a chuva"] | "Ponte sob a Chuva" | "Ponte Sob A Chuva" |
text.capitalize#["dias até a festa"] | "Dias até a Festa" | "Dias Até A Festa" |
text.capitalize#["mora num sítio"] | "Mora num Sítio" | "Mora Num Sítio" |
text.capitalize#["perante o juiz"] | "Perante o Juiz" | "Perante O Juiz" |
text.capitalize#["sobre a mesa"] | "Sobre a Mesa" | "Sobre A Mesa" |
text.removeAccents#["a᪰"] | "a" | "a᪰" |
text.removeAccents#["क़"] | "क" | "क़" |
vin.isValid#wrong-check-digit | true | false |
vin.isValid#["1HGCM826C3A004352"] | true | false |
vin.isValid#["9BWZZZ377VT004251"] | true | false |
voterId.format#[""] | "" | expected "", got null |
voterId.format#["1"] | "1" | expected "1", got null |
voterId.format#["12"] | "12" | expected "12", got null |
voterId.format#["123"] | "123" | expected "123", got null |
voterId.format#["1234"] | "1234" | expected "1234", got null |
voterId.format#["12345"] | "1234 5" | expected "1234 5", got null |
voterId.format#["123456"] | "1234 56" | expected "1234 56", got null |
voterId.format#["1234567"] | "1234 567" | expected "1234 567", got null |
voterId.format#["12345678"] | "1234 5678" | expected "1234 5678", got null |
voterId.format#["123456780"] | "1234 5678 0" | expected "1234 5678 0", got null |
voterId.format#["1234567801"] | "1234 5678 01" | expected "1234 5678 01", got null |
voterId.format#["12345678012"] | "1234 5678 01 2" | expected "1234 5678 01 2", got null |
voterId.format#["123456780124"] | "1234 5678 01 24" | expected "1234 5678 01 24", got null |
voterId.format#["1234567880191"] | "1234 5678 80 19" | "1234 5678 8 01 91" |
voterId.format#["1234567880299"] | "1234 5678 80 29" | "1234 5678 8 02 99" |
voterId.format#["12345678801912"] | "1234 5678 80 19" | expected "1234 5678 80 19", got null |
voterId.format#["123456788019123"] | "1234 5678 80 19" | expected "1234 5678 80 19", got null |
voterId.format#["12345678803991"] | "1234 5678 80 39" | expected "1234 5678 80 39", got null |
voterId.format#["1234567880399"] | "1234 5678 80 39" | expected "1234 5678 80 39", got null |
voterId.format#["123456788"] | "1234 5678 8" | expected "1234 5678 8", got null |
voterId.format#["123456788019"] | "1234 5678 80 19" | expected "1234 5678 80 19", got null |
voterId.format#["123450159"] | "1234 5015 9" | expected "1234 5015 9", got null |
voterId.format#[-123456780124] | "" | expected "", got null |
voterId.format#[1.5] | "" | expected "", got null |
voterId.format#[9007199254740992] | "" | expected "", got null |
voterId.format#["123456780175"] | "1234 5678 01 75" | expected "1234 5678 01 75", got null |
voterId.isValid#["1234567880191"] | false | true |
voterId.isValid#["1023-8501-06-71"] | true | false |
voterId.isValid#["1023 8501 06 71"] | true | false |
voterId.isValid#["1023.8501.06.71"] | true | false |
voterId.isValid#["000010191"] | true | false |
voterId.isValid#["123450159"] | true | false |
voterId.isValid#["00123450159"] | true | false |
voterId.isValid#["1 2345 01 59"] | true | false |
voterId.isValid#["12345 01 59"] | true | false |
voterId.isValid#["122844"] | true | false |
voterId.isValid#["12340639"] | true | false |
voterId.isValid#["1234 06 39"] | true | false |
voterId.isValid#["10191"] | true | false |
voterId.isValid#["0123456780191"] | false | true |
voterId.isValid#["0001.2345.01.59"] | true | false |
voterId.isValid#["123 4567 01 91"] | true | false |
voterId.isValid#["1023-8501/06-71"] | true | false |
voterId.isValid#[" 1023 8501 06 71 "] | true | false |
voterId.parse#13-digit-sp-mg | "123456788019" | "1234567880191" |
voterId.parse#["1234567880299"] | "123456788029" | "1234567880299" |
voterId.parse#["123456788019199"] | "123456788019" | "1234567880191" |
voterId.parse#[-123456780124] | "" | "123456780124" |
Functions without a usage example
These functions work, but the library's usage files have no example for them. Their tab on this site is empty.
- Area code (DDD): Decode
areaCode.getInfo - Area code (DDD): List by state
areaCode.listByState - Banks: Get by code
bank.getByCode - Banks: Get by ispb
bank.getByIspb - Banks: List
bank.list - Bank account: Validate
bankAccount.isValid - Boleto: Format
boleto.format - Boleto: Generate
boleto.generate - Boleto: Decode
boleto.getInfo - Boleto: Parse
boleto.parse - CAEPF: Format
caepf.format - CAEPF: Validate
caepf.isValid - CAEPF: Parse
caepf.parse - CBO: Look up
cbo.get - CBO: Validate
cbo.isValid - CBO: Parse
cbo.parse - CEI: Format
cei.format - CEI: Validate
cei.isValid - CEI: Parse
cei.parse - CEP: Get address info
cep.getAddressInfo - CEP: Parse
cep.parse - Civil registry certificate: Format
certidao.format - Civil registry certificate: Decode
certidao.getInfo - Civil registry certificate: Validate
certidao.isValid - Civil registry certificate: Parse
certidao.parse - CFOP: Look up
cfop.get - CFOP: Validate
cfop.isValid - CFOP: Parse
cfop.parse - CNAE: Format
cnae.format - CNAE: Look up
cnae.get - CNAE: Validate
cnae.isValid - CNAE: Parse
cnae.parse - Driver's license (CNH): Format
cnh.format - Driver's license (CNH): Generate
cnh.generate - Driver's license (CNH): Parse
cnh.parse - CNO: Format
cno.format - CNO: Validate
cno.isValid - CNO: Parse
cno.parse - CNPJ: Parse
cnpj.parse - CNS (SUS card): Format
cns.format - CNS (SUS card): Validate
cns.isValid - CNS (SUS card): Parse
cns.parse - CPF: Parse
cpf.parse - Payment card: Validate
creditCard.isValid - CSOSN: Validate
csosn.isValid - CST: Validate
cst.isValid - Currency (BRL): Write out in words
currency.convertToWords - Currency (BRL): Format
currency.format - Currency (BRL): Parse
currency.parse - Dates and holidays: Write out in words
date.convertToWords - Dates and holidays: Difference in business days
date.differenceInBusinessDays - Dates and holidays: Is business day
date.isBusinessDay - Dates and holidays: Is holiday
date.isHoliday - IBAN: Format
iban.format - IBAN: Decode
iban.getInfo - IBAN: Validate
iban.isValid - IBAN: Parse
iban.parse - Legal nature: Format
legalNature.format - Legal nature: Generate
legalNature.generate - Legal nature: Look up
legalNature.get - Legal nature: List
legalNature.list - Legal nature: List by category
legalNature.listByCategory - Legal nature: Parse
legalNature.parse - Court case number: Generate
legalProcess.generate - Court case number: Parse
legalProcess.parse - License plate: Parse
licensePlate.parse - Municipalities: Get by code
municipality.getByCode - Municipalities: List
municipality.list - NCM: Format
ncm.format - NCM: Validate
ncm.isValid - NCM: Parse
ncm.parse - NF-e access key: Format
nfeKey.format - NF-e access key: Decode
nfeKey.getInfo - NF-e access key: Validate
nfeKey.isValid - NF-e access key: Parse
nfeKey.parse - Numbers in words: Write out in words
number.convertToWords - Passport: Format
passport.format - Passport: Generate
passport.generate - Passport: Validate
passport.isValid - Passport: Parse
passport.parse - Phone: Format
phone.format - Phone: Generate
phone.generate - Phone: Validate
phone.isValid - Phone: Is valid landline
phone.isValidLandline - Phone: Is valid mobile
phone.isValidMobile - Phone: Is valid service
phone.isValidService - Phone: Parse
phone.parse - PIS/PASEP: Parse
pis.parse - Pix key: Decode
pixKey.getInfo - Pix key: Validate
pixKey.isValid - Pix payload (BR Code): Generate
pixPayload.generate - Pix payload (BR Code): Decode
pixPayload.getInfo - Pix payload (BR Code): Validate
pixPayload.isValid - Professional registration: Validate
registroProfissional.isValid - RENAVAM: Generate
renavam.generate - States (UF): Get by ibge code
state.getByIbgeCode - States (UF): Get code by name
state.getCodeByName - States (UF): Get name by code
state.getNameByCode - States (UF): Get timezone
state.getTimezone - States (UF): List
state.list - Text: Capitalize
text.capitalize - Text: Remove accents
text.removeAccents - VIN (chassis): Validate
vin.isValid - Voter ID: Parse
voterId.parse
Public functions outside the contract
No contract function describes these public functions. For each one, bind it to a contract function, propose it for the contract, or mark it as internal in the library's configuration.
BoletoUtils.apply_maskCEPUtils.normalize_stringCSOSNUtils.get_descriptionCSOSNUtils.listLegalNatureUtils.get_categoryUF.code_from_nameUF.name_from_codeUF.valid?
Badge for your README
The badge shows the share of core functions and the cases that pass, and changes with every run. Paste this Markdown in the library's README:
[](https://brazilian-utils.com.br/libs/ruby/)