Erlang library
What the Erlang library implements from the shared contract, what fails, and what to do next.
- Repository
- github.com/brazilian-utils/erlang
48dd38d - Package
- brutils
Install
{deps, [brutils]}. % rebar.configErlang implements 29 of the 182 contract functions and 12.5% of the core functions. 340 shared cases pass and 352 fail.
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 library | 27.5% | 133/182 | 2589 |
| Python library | 17.5% | 40/182 | 500 |
| Erlang | 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.
23 functions fail
Show the 23 failing functions
| Function | Status | Details | Implemented by |
|---|---|---|---|
CEP: Formatcep.format (core) | fails | 13 cases fail | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
CEP: Validatecep.isValid (core) | fails | 10 cases fail | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
Driver's license (CNH): Validatecnh.isValid (core) | fails | 5 cases fail | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
CNPJ: Formatcnpj.format (core) | fails | 36 cases fail | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
CNPJ: Validatecnpj.isValid (core) | fails | 4 cases fail | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
CPF: Formatcpf.format (core) | fails | 28 cases fail | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
CPF: Validatecpf.isValid (core) | fails | 5 cases fail | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
License plate: Convert to mercosullicensePlate.convertToMercosul (core) | fails | 8 cases fail | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
License plate: FormatlicensePlate.format (core) | fails | 17 cases fail | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
License plate: GeneratelicensePlate.generate (core) | fails | 4 cases fail | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
License plate: Get formatlicensePlate.getFormat (core) | fails | 11 cases fail | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
License plate: ValidatelicensePlate.isValid (core) | fails | 17 cases fail | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
Passport: Formatpassport.format | fails | 17 cases fail | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
Passport: Validatepassport.isValid | fails | 4 cases fail | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
Phone: Formatphone.format (core) | fails | 15 cases fail | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
Phone: Generatephone.generate (core) | fails | 3 cases fail | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
PIS/PASEP: Formatpis.format (core) | fails | 54 cases fail | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
PIS/PASEP: Validatepis.isValid (core) | fails | 6 cases fail | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
RENAVAM: Validaterenavam.isValid (core) | fails | 7 cases fail | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
Voter ID: FormatvoterId.format (core) | fails | 26 cases fail | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
Voter ID: ValidatevoterId.isValid (core) | fails | 18 cases fail | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
CNPJ: Generatecnpj.generate (core) | fails | 5 cases fail | 5: JavaScript, Python, Go, Ruby, .NET |
Phone: Validatephone.isValid (core) | fails | 39 cases fail | 5: JavaScript, Go, Ruby, Rust, .NET |
153 functions are missing
Show the 153 missing functions
| Function | Status | Implemented by |
|---|---|---|
Currency (BRL): Write out in wordscurrency.convertToWords (core) | missing | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
Currency (BRL): Formatcurrency.format (core) | missing | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
Email: Validateemail.isValid (core) | missing | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
Legal nature: ValidatelegalNature.isValid (core) | missing | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
Legal nature: ListlegalNature.list (core) | missing | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
Court case number: FormatlegalProcess.format (core) | missing | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
Court case number: GeneratelegalProcess.generate (core) | missing | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
Court case number: ValidatelegalProcess.isValid (core) | missing | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
Boleto: Validateboleto.isValid (core) | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CEP: Get address infocep.getAddressInfo (core) | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Dates and holidays: Is holidaydate.isHoliday (core) | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Legal nature: Get descriptionlegalNature.getDescription (core) | missing | 5: Python, Go, Ruby, Rust, .NET |
CEP: Get info by addresscep.getInfoByAddress (core) | missing | 4: JavaScript, Go, Rust, .NET |
Municipalities: Get code by namemunicipality.getCodeByName (core) | missing | 1: JavaScript |
Dates and holidays: Write out in wordsdate.convertToWords | missing | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
States (UF): Get code by namestate.getCodeByName | missing | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
States (UF): Get name by codestate.getNameByCode | missing | 6: JavaScript, Python, Go, Ruby, Rust, .NET |
Area code (DDD): List by stateareaCode.listByState | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Banks: Get by codebank.getByCode | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Banks: Get by ispbbank.getByIspb | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Banks: Listbank.list | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Bank account: ValidatebankAccount.isValid | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Boleto: Formatboleto.format | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Boleto: Generateboleto.generate | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Boleto: Parseboleto.parse | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CAEPF: Formatcaepf.format | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CAEPF: Validatecaepf.isValid | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CAEPF: Parsecaepf.parse | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CBO: Look upcbo.get | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CBO: Validatecbo.isValid | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CBO: Parsecbo.parse | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CEI: Formatcei.format | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CEI: Validatecei.isValid | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CEI: Parsecei.parse | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CEP: Parsecep.parse | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Civil registry certificate: Formatcertidao.format | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Civil registry certificate: Decodecertidao.getInfo | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Civil registry certificate: Parsecertidao.parse | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CFOP: Look upcfop.get | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CFOP: Validatecfop.isValid | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CFOP: Parsecfop.parse | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CNAE: Formatcnae.format | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CNAE: Look upcnae.get | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CNAE: Validatecnae.isValid | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CNAE: Parsecnae.parse | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Driver's license (CNH): Formatcnh.format | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Driver's license (CNH): Generatecnh.generate | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Driver's license (CNH): Parsecnh.parse | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CNO: Formatcno.format | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CNO: Validatecno.isValid | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CNO: Parsecno.parse | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CNPJ: Parsecnpj.parse | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CNS (SUS card): Formatcns.format | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CNS (SUS card): Validatecns.isValid | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CNS (SUS card): Parsecns.parse | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CPF: Parsecpf.parse | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Payment card: ValidatecreditCard.isValid | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CSOSN: Validatecsosn.isValid | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
CST: Validatecst.isValid | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Currency (BRL): Parsecurrency.parse | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Dates and holidays: Difference in business daysdate.differenceInBusinessDays | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Dates and holidays: Is business daydate.isBusinessDay | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
IBAN: Formatiban.format | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
IBAN: Decodeiban.getInfo | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
IBAN: Validateiban.isValid | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
IBAN: Parseiban.parse | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Legal nature: FormatlegalNature.format | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Legal nature: GeneratelegalNature.generate | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Legal nature: Look uplegalNature.get | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Legal nature: List by categorylegalNature.listByCategory | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Legal nature: ParselegalNature.parse | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Court case number: ParselegalProcess.parse | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
License plate: ParselicensePlate.parse | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Municipalities: Get by codemunicipality.getByCode | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Municipalities: Listmunicipality.list | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
NCM: Formatncm.format | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
NCM: Validatencm.isValid | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
NCM: Parsencm.parse | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
NF-e access key: FormatnfeKey.format | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
NF-e access key: DecodenfeKey.getInfo | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
NF-e access key: ValidatenfeKey.isValid | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
NF-e access key: ParsenfeKey.parse | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Numbers in words: Write out in wordsnumber.convertToWords | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Passport: Parsepassport.parse | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Phone: Is valid landlinephone.isValidLandline | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Phone: Is valid mobilephone.isValidMobile | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Phone: Is valid servicephone.isValidService | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Phone: Parsephone.parse | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
PIS/PASEP: Parsepis.parse | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Pix key: DecodepixKey.getInfo | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Pix key: ValidatepixKey.isValid | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Pix payload (BR Code): DecodepixPayload.getInfo | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Pix payload (BR Code): ValidatepixPayload.isValid | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Professional registration: ValidateregistroProfissional.isValid | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
RENAVAM: Generaterenavam.generate | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
States (UF): Get timezonestate.getTimezone | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
States (UF): Liststate.list | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Text: Capitalizetext.capitalize | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Text: Remove accentstext.removeAccents | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
VIN (chassis): Validatevin.isValid | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Voter ID: ParsevoterId.parse | missing | 5: JavaScript, Go, Ruby, Rust, .NET |
Area code (DDD): DecodeareaCode.getInfo | missing | 4: JavaScript, Go, Ruby, .NET |
Civil registry certificate: Validatecertidao.isValid | missing | 4: JavaScript, Go, Ruby, Rust |
Dates and holidays: Get holidaysdate.getHolidays | missing | 4: JavaScript, Go, Rust, .NET |
State registration (IE): Validateie.isValid | missing | 4: JavaScript, Go, Rust, .NET |
Pix payload (BR Code): GeneratepixPayload.generate | missing | 4: JavaScript, Go, Ruby, Rust |
States (UF): Get by ibge codestate.getByIbgeCode | missing | 4: JavaScript, Go, Ruby, .NET |
Boleto: Decodeboleto.getInfo | missing | 3: JavaScript, Go, Ruby |
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 |
Dates and holidays: Add business daysdate.addBusinessDays | missing | 1: JavaScript |
Dates and holidays: Sub business daysdate.subBusinessDays | 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 352 failing cases
| Case | Expected | Actual |
|---|---|---|
cep.format#[""] | "" | expected "", threw: {error, invalid} |
cep.format#["0"] | "0" | expected "0", threw: {error, invalid} |
cep.format#["01"] | "01" | expected "01", threw: {error, invalid} |
cep.format#["010"] | "010" | expected "010", threw: {error, invalid} |
cep.format#["0100"] | "0100" | expected "0100", threw: {error, invalid} |
cep.format#["01001"] | "01001" | expected "01001", threw: {error, invalid} |
cep.format#["010010"] | "01001-0" | expected "01001-0", threw: {error, invalid} |
cep.format#["0100100"] | "01001-00" | expected "01001-00", threw: {error, invalid} |
cep.format#["01001000000000"] | "01001-000" | expected "01001-000", threw: {error, invalid} |
cep.format#["a0.10cr01?00#ab0"] | "01001-000" | expected "01001-000", threw: {error, invalid} |
cep.format#negative-number | "" | expected "", threw: error:function_clause |
cep.format#fractional-number | "" | expected "", threw: error:function_clause |
cep.format#unsafe-number | "" | expected "", threw: error:function_clause |
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 |
cnh.isValid#valid-sample | true | false |
cnh.isValid#["00000009309"] | true | false |
cnh.isValid#["ab00000000119"] | false | true |
cnh.isValid#["00000000119ab"] | false | true |
cnh.isValid#["000000001_19"] | false | true |
cnpj.format#[""] | "" | expected "", threw: {error, invalid} |
cnpj.format#["4"] | "4" | expected "4", threw: {error, invalid} |
cnpj.format#["46"] | "46" | expected "46", threw: {error, invalid} |
cnpj.format#["468"] | "46.8" | expected "46.8", threw: {error, invalid} |
cnpj.format#["4684"] | "46.84" | expected "46.84", threw: {error, invalid} |
cnpj.format#["46843"] | "46.843" | expected "46.843", threw: {error, invalid} |
cnpj.format#["468434"] | "46.843.4" | expected "46.843.4", threw: {error, invalid} |
cnpj.format#["4684348"] | "46.843.48" | expected "46.843.48", threw: {error, invalid} |
cnpj.format#["46843485"] | "46.843.485" | expected "46.843.485", threw: {error, invalid} |
cnpj.format#["468434850"] | "46.843.485/0" | expected "46.843.485/0", threw: {error, invalid} |
cnpj.format#["4684348500"] | "46.843.485/00" | expected "46.843.485/00", threw: {error, invalid} |
cnpj.format#["46843485000"] | "46.843.485/000" | expected "46.843.485/000", threw: {error, invalid} |
cnpj.format#["468434850001"] | "46.843.485/0001" | expected "46.843.485/0001", threw: {error, invalid} |
cnpj.format#["4684348500018"] | "46.843.485/0001-8" | expected "46.843.485/0001-8", threw: {error, invalid} |
cnpj.format#[4] | "4" | expected "4", threw: error:function_clause |
cnpj.format#[46] | "46" | expected "46", threw: error:function_clause |
cnpj.format#[468] | "46.8" | expected "46.8", threw: error:function_clause |
cnpj.format#[4684] | "46.84" | expected "46.84", threw: error:function_clause |
cnpj.format#[46843] | "46.843" | expected "46.843", threw: error:function_clause |
cnpj.format#[468434] | "46.843.4" | expected "46.843.4", threw: error:function_clause |
cnpj.format#[4684348] | "46.843.48" | expected "46.843.48", threw: error:function_clause |
cnpj.format#[46843485] | "46.843.485" | expected "46.843.485", threw: error:function_clause |
cnpj.format#[468434850] | "46.843.485/0" | expected "46.843.485/0", threw: error:function_clause |
cnpj.format#[4684348500] | "46.843.485/00" | expected "46.843.485/00", threw: error:function_clause |
cnpj.format#[46843485000] | "46.843.485/000" | expected "46.843.485/000", threw: error:function_clause |
cnpj.format#[468434850001] | "46.843.485/0001" | expected "46.843.485/0001", threw: error:function_clause |
cnpj.format#[4684348500018] | "46.843.485/0001-8" | expected "46.843.485/0001-8", threw: error:function_clause |
cnpj.format#[46843485000186] | "46.843.485/0001-86" | expected "46.843.485/0001-86", threw: error:function_clause |
cnpj.format#["468434850001860000000000"] | "46.843.485/0001-86" | expected "46.843.485/0001-86", threw: {error, invalid} |
cnpj.format#["46.?ABC843.485/0001-86abc"] | "46.843.485/0001-86" | expected "46.843.485/0001-86", threw: {error, invalid} |
cnpj.format#[-11222333000181] | "" | expected "", threw: error:function_clause |
cnpj.format#[-1] | "" | expected "", threw: error:function_clause |
cnpj.format#[1.5] | "" | expected "", threw: error:function_clause |
cnpj.format#[9007199254740992] | "" | expected "", threw: error:function_clause |
cnpj.format#["24522200000174"] | "24.522.200/0001-74" | expected "24.522.200/0001-74", threw: {error, invalid} |
cnpj.format#["12OUT345000199"] | "12.345.000/199" | expected "12.345.000/199", threw: {error, invalid} |
cnpj.generate#given-branch | null | expected /^[0-9]{8}0003[0-9]{2}$/, threw: error:function_clause |
cnpj.generate#[{"version":2,"branch":1}] | null | expected /^[0-9A-Z]{8}0001[0-9]{2}$/, threw: error:function_clause |
cnpj.generate#[{"branch":0}] | null | expected /^[0-9]{14}$/, threw: error:function_clause |
cnpj.generate#[{"branch":9999}] | null | expected /^[0-9]{8}9999[0-9]{2}$/, threw: error:function_clause |
cnpj.generate#[{"branch":42}] | null | expected /^[0-9]{8}0042[0-9]{2}$/, threw: error:function_clause |
cnpj.isValid#["Q0SLFMBD7VX439"] | false | true |
cnpj.isValid#["60.391.947/0001-00"] | true | false |
cnpj.isValid#["11 222 333 0001 81"] | true | false |
cnpj.isValid#[" 13723705000189 "] | true | false |
cpf.format#[""] | "" | expected "", threw: {error, invalid} |
cpf.format#["9"] | "9" | expected "9", threw: {error, invalid} |
cpf.format#["94"] | "94" | expected "94", threw: {error, invalid} |
cpf.format#["943"] | "943" | expected "943", threw: {error, invalid} |
cpf.format#["9438"] | "943.8" | expected "943.8", threw: {error, invalid} |
cpf.format#["94389"] | "943.89" | expected "943.89", threw: {error, invalid} |
cpf.format#["943895"] | "943.895" | expected "943.895", threw: {error, invalid} |
cpf.format#["9438957"] | "943.895.7" | expected "943.895.7", threw: {error, invalid} |
cpf.format#["94389575"] | "943.895.75" | expected "943.895.75", threw: {error, invalid} |
cpf.format#["943895751"] | "943.895.751" | expected "943.895.751", threw: {error, invalid} |
cpf.format#["9438957510"] | "943.895.751-0" | expected "943.895.751-0", threw: {error, invalid} |
cpf.format#[9] | "9" | expected "9", threw: error:function_clause |
cpf.format#[94] | "94" | expected "94", threw: error:function_clause |
cpf.format#[943] | "943" | expected "943", threw: error:function_clause |
cpf.format#[9438] | "943.8" | expected "943.8", threw: error:function_clause |
cpf.format#[94389] | "943.89" | expected "943.89", threw: error:function_clause |
cpf.format#[943895] | "943.895" | expected "943.895", threw: error:function_clause |
cpf.format#[9438957] | "943.895.7" | expected "943.895.7", threw: error:function_clause |
cpf.format#[94389575] | "943.895.75" | expected "943.895.75", threw: error:function_clause |
cpf.format#[943895751] | "943.895.751" | expected "943.895.751", threw: error:function_clause |
cpf.format#[9438957510] | "943.895.751-0" | expected "943.895.751-0", threw: error:function_clause |
cpf.format#[94389575104] | "943.895.751-04" | expected "943.895.751-04", threw: error:function_clause |
cpf.format#["94389575104000000"] | "943.895.751-04" | expected "943.895.751-04", threw: {error, invalid} |
cpf.format#["943.?ABC895.751-04abc"] | "943.895.751-04" | expected "943.895.751-04", threw: {error, invalid} |
cpf.format#[123456789.09] | "" | expected "", threw: error:function_clause |
cpf.format#[-1] | "" | expected "", threw: error:function_clause |
cpf.format#[1.5] | "" | expected "", threw: error:function_clause |
cpf.format#[9007199254740992] | "" | expected "", threw: error:function_clause |
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 |
licensePlate.convertToMercosul#hyphen-mask | "ABC1C34" | expected "ABC1C34", threw: {error, invalid} |
licensePlate.convertToMercosul#already-mercosul | "" | expected "", threw: {error, invalid} |
licensePlate.convertToMercosul#invalid | "" | expected "", threw: {error, invalid} |
licensePlate.convertToMercosul#empty | "" | expected "", threw: {error, invalid} |
licensePlate.convertToMercosul#["ABC12D3"] | "" | expected "", threw: {error, invalid} |
licensePlate.convertToMercosul#["ABC1234EXTRA"] | "" | expected "", threw: {error, invalid} |
licensePlate.convertToMercosul#["ABC12345"] | "" | expected "", threw: {error, invalid} |
licensePlate.convertToMercosul#["ABC123"] | "" | expected "", threw: {error, invalid} |
licensePlate.format#[""] | "" | expected "", threw: {error, invalid} |
licensePlate.format#["a"] | "A" | expected "A", threw: {error, invalid} |
licensePlate.format#["ab"] | "AB" | expected "AB", threw: {error, invalid} |
licensePlate.format#["abc"] | "ABC" | expected "ABC", threw: {error, invalid} |
licensePlate.format#["abc1"] | "ABC-1" | expected "ABC-1", threw: {error, invalid} |
licensePlate.format#["abc12"] | "ABC-12" | expected "ABC-12", threw: {error, invalid} |
licensePlate.format#["abc123"] | "ABC-123" | expected "ABC-123", threw: {error, invalid} |
licensePlate.format#["abc1d"] | "ABC1D" | expected "ABC1D", threw: {error, invalid} |
licensePlate.format#["abc1d2"] | "ABC1D2" | expected "ABC1D2", threw: {error, invalid} |
licensePlate.format#["abc-1234"] | "ABC-1234" | expected "ABC-1234", threw: {error, invalid} |
licensePlate.format#["abc1-d23"] | "ABC1D23" | expected "ABC1D23", threw: {error, invalid} |
licensePlate.format#["abc1da2"] | "" | expected "", threw: {error, invalid} |
licensePlate.format#["abc12d"] | "" | expected "", threw: {error, invalid} |
licensePlate.format#["abc12d3"] | "" | expected "", threw: {error, invalid} |
licensePlate.format#["1"] | "" | expected "", threw: {error, invalid} |
licensePlate.format#["1ab4"] | "" | expected "", threw: {error, invalid} |
licensePlate.format#["ab14"] | "" | expected "", threw: {error, invalid} |
licensePlate.generate#mercosul-fifth-char-k-to-z | null | "LUO7F93" |
licensePlate.generate#explicit-mercosul | null | "YFM0I45" |
licensePlate.generate#unknown-format-falls-back | null | expected /^[A-Z]{3}[0-9][K-Z][0-9]{2}$/, threw: {error, invalid} |
licensePlate.generate#bogus-format-falls-back | null | threw: {error, invalid} |
licensePlate.getFormat#["WDG1S21"] | "LLLNLNN" | "mercosul" |
licensePlate.getFormat#["WDG1S22"] | "LLLNLNN" | "mercosul" |
licensePlate.getFormat#["wdg1s21"] | "LLLNLNN" | "mercosul" |
licensePlate.getFormat#["GJG8U81"] | "LLLNLNN" | "mercosul" |
licensePlate.getFormat#["GJG8U82"] | "LLLNLNN" | "mercosul" |
licensePlate.getFormat#["gjg8u81"] | "LLLNLNN" | "mercosul" |
licensePlate.getFormat#["KDS4W15"] | "LLLNLNN" | "mercosul" |
licensePlate.getFormat#["KDS4W16"] | "LLLNLNN" | "mercosul" |
licensePlate.getFormat#["kds4w15"] | "LLLNLNN" | "mercosul" |
licensePlate.getFormat#["ABC1234"] | "LLLNNNN" | "old_format" |
licensePlate.getFormat#["ABC1D23"] | "LLLNLNN" | "mercosul" |
licensePlate.isValid#["abc-1234"] | true | false |
licensePlate.isValid#["ABC-1234"] | true | false |
licensePlate.isValid#["ABC 1234"] | true | false |
licensePlate.isValid#["ABC-1D23"] | true | false |
licensePlate.isValid#["ABC1D23",{"format":"LLLNLNN"}] | true | expected true, threw: error:function_clause |
licensePlate.isValid#["ABC1D23",{"format":"LLLNNNN"}] | false | expected false, threw: error:function_clause |
licensePlate.isValid#["ABC1234",{"format":"LLLNNNN"}] | true | expected true, threw: error:function_clause |
licensePlate.isValid#["ABC1234",{"format":"LLLNLNN"}] | false | expected false, threw: error:function_clause |
licensePlate.isValid#["abc1d23",{"format":"LLLNLNN"}] | true | expected true, threw: error:function_clause |
licensePlate.isValid#["ABC12D3",{"format":"LLLNLNN"}] | false | expected false, threw: error:function_clause |
licensePlate.isValid#["abc",{"format":"LLLNNNN"}] | false | expected false, threw: error:function_clause |
licensePlate.isValid#["ABC1D23",{"format":"mercosul"}] | true | expected true, threw: error:function_clause |
licensePlate.isValid#["ABC1234",{}] | true | expected true, threw: error:function_clause |
licensePlate.isValid#["ABC.1234"] | true | false |
licensePlate.isValid#["ABC/1234"] | true | false |
licensePlate.isValid#["ABC - 1234"] | true | false |
licensePlate.isValid#["ABC-1234",{"format":"LLLNNNN"}] | true | expected true, threw: error:function_clause |
passport.format#lowercase | "ACD12736" | expected "ACD12736", threw: {error, invalid} |
passport.format#partial | "AB12" | expected "AB12", threw: {error, invalid} |
passport.format#empty | "" | expected "", threw: {error, invalid} |
passport.format#caps-length | "AB123456" | expected "AB123456", threw: {error, invalid} |
passport.format#["A"] | "A" | expected "A", threw: {error, invalid} |
passport.format#["AB"] | "AB" | expected "AB", threw: {error, invalid} |
passport.format#["AB1"] | "AB1" | expected "AB1", threw: {error, invalid} |
passport.format#["AB123"] | "AB123" | expected "AB123", threw: {error, invalid} |
passport.format#["AB1234"] | "AB1234" | expected "AB1234", threw: {error, invalid} |
passport.format#["AB12345"] | "AB12345" | expected "AB12345", threw: {error, invalid} |
passport.format#["a"] | "A" | expected "A", threw: {error, invalid} |
passport.format#["ac"] | "AC" | expected "AC", threw: {error, invalid} |
passport.format#["acd"] | "ACD" | expected "ACD", threw: {error, invalid} |
passport.format#["acd1"] | "ACD1" | expected "ACD1", threw: {error, invalid} |
passport.format#["acd12"] | "ACD12" | expected "ACD12", threw: {error, invalid} |
passport.format#["acd127"] | "ACD127" | expected "ACD127", threw: {error, invalid} |
passport.format#["acd1273"] | "ACD1273" | expected "ACD1273", threw: {error, invalid} |
passport.isValid#lowercase | true | false |
passport.isValid#masked | true | false |
passport.isValid#dotted | true | false |
passport.isValid#["AB-123.456"] | true | false |
phone.format#subscriber-number | "98888-7777" | expected "98888-7777", threw: {error, invalid} |
phone.format#partial | "98888-777" | expected "98888-777", threw: {error, invalid} |
phone.format#empty | "" | expected "", threw: {error, invalid} |
phone.format#ddd-under-default-mask | "11300-0000" | "(11)3000-0000" |
phone.format#["9"] | "9" | expected "9", threw: {error, invalid} |
phone.format#["98"] | "98" | expected "98", threw: {error, invalid} |
phone.format#["988"] | "988" | expected "988", threw: {error, invalid} |
phone.format#["9888"] | "9888" | expected "9888", threw: {error, invalid} |
phone.format#["98888"] | "98888" | expected "98888", threw: {error, invalid} |
phone.format#["988887"] | "98888-7" | expected "98888-7", threw: {error, invalid} |
phone.format#["9888877"] | "98888-77" | expected "98888-77", threw: {error, invalid} |
phone.format#[9007199254740992] | "" | expected "", threw: error:function_clause |
phone.format#["+5511988887777"] | "11988-8877" | expected "11988-8877", threw: {error, invalid} |
phone.format#["+55 55 98888-7777"] | "55988-8877" | expected "55988-8877", threw: {error, invalid} |
phone.format#["11900000000"] | "11900-0000" | "(11)90000-0000" |
phone.generate#["mobile"] | null | expected /^\d{2}9\d{8}$/, threw: error:function_clause |
phone.generate#["landline"] | null | expected /^\d{2}[2-5]\d{7}$/, threw: error:function_clause |
phone.generate#["service"] | null | expected /^(0(300|303|500|800|900)\d{7}|[34]00\d{5})$/, threw: error:function_clause |
phone.isValid#["+55 0800 123 4567",{"accept":["service"]}] | true | expected true, threw: error:function_clause |
phone.isValid#["0055 4004-1234",{"accept":["service"]}] | true | expected true, threw: error:function_clause |
phone.isValid#["5508001234567",{"accept":["service"]}] | true | expected true, threw: error:function_clause |
phone.isValid#["55 0300 123 4567",{"accept":["service"]}] | true | expected true, threw: error:function_clause |
phone.isValid#["(11) 98765-4321",{"accept":[]}] | false | expected false, threw: error:function_clause |
phone.isValid#["1130000000",{"accept":[]}] | false | expected false, threw: error:function_clause |
phone.isValid#["08001234567",{"accept":[]}] | false | expected false, threw: error:function_clause |
phone.isValid#["11612345678",{"version":2}] | false | expected false, threw: error:function_clause |
phone.isValid#["11700123456",{"version":2}] | false | expected false, threw: error:function_clause |
phone.isValid#["11987654321",{"accept":["landline"]}] | false | expected false, threw: error:function_clause |
phone.isValid#["1130000000",{"accept":["mobile"]}] | false | expected false, threw: error:function_clause |
phone.isValid#["11987654321",{"accept":["service"]}] | false | expected false, threw: error:function_clause |
phone.isValid#["08001234567",{"accept":["mobile","landline"]}] | false | expected false, threw: error:function_clause |
phone.isValid#["(11) 98765-4321"] | true | false |
phone.isValid#["11987654321",{"version":2}] | true | expected true, threw: error:function_clause |
phone.isValid#["11712345678",{"version":2}] | true | expected true, threw: error:function_clause |
phone.isValid#["11812345678",{"version":2}] | true | expected true, threw: error:function_clause |
phone.isValid#["(11) 3000-0000"] | true | false |
phone.isValid#["11712345678",{"version":1}] | true | expected true, threw: error:function_clause |
phone.isValid#["+5511987654321"] | true | false |
phone.isValid#["+55 11 98765-4321"] | true | false |
phone.isValid#["+55 (11) 98765-4321"] | true | false |
phone.isValid#["0055 11 98765-4321"] | true | false |
phone.isValid#["5511987654321"] | true | false |
phone.isValid#["+55 (11) 3000-0000"] | true | false |
phone.isValid#["+55 11 98765-4321",{"version":2}] | true | expected true, threw: error:function_clause |
phone.isValid#["11987654321",{"accept":["mobile"]}] | true | expected true, threw: error:function_clause |
phone.isValid#["1130000000",{"accept":["landline"]}] | true | expected true, threw: error:function_clause |
phone.isValid#["08001234567",{"accept":["service"]}] | true | expected true, threw: error:function_clause |
phone.isValid#["40041234",{"accept":["service"]}] | true | expected true, threw: error:function_clause |
phone.isValid#["190",{"accept":["service"]}] | true | expected true, threw: error:function_clause |
phone.isValid#["0800 123 4567",{"accept":["service"]}] | true | expected true, threw: error:function_clause |
phone.isValid#["11987654321",{"accept":["mobile","landline","service"]}] | true | expected true, threw: error:function_clause |
phone.isValid#["08001234567",{"accept":["mobile","landline","service"]}] | true | expected true, threw: error:function_clause |
phone.isValid#["112",{"accept":["service"]}] | true | expected true, threw: error:function_clause |
phone.isValid#["abc190",{"accept":["service"]}] | false | expected false, threw: error:function_clause |
phone.isValid#["0800 123 4567 ramal 1",{"accept":["service"]}] | false | expected false, threw: error:function_clause |
phone.isValid#["11.98765/4321"] | true | false |
phone.isValid#["11900000000",{"accept":[]}] | false | expected false, threw: error:function_clause |
pis.format#[""] | "" | expected "", threw: {error, invalid} |
pis.format#["0"] | "0" | expected "0", threw: {error, invalid} |
pis.format#["00"] | "00" | expected "00", threw: {error, invalid} |
pis.format#["000"] | "000" | expected "000", threw: {error, invalid} |
pis.format#["0000"] | "000.0" | expected "000.0", threw: {error, invalid} |
pis.format#["00000"] | "000.00" | expected "000.00", threw: {error, invalid} |
pis.format#["000000"] | "000.000" | expected "000.000", threw: {error, invalid} |
pis.format#["0000000"] | "000.0000" | expected "000.0000", threw: {error, invalid} |
pis.format#["00000000"] | "000.00000" | expected "000.00000", threw: {error, invalid} |
pis.format#["000000000"] | "000.00000.0" | expected "000.00000.0", threw: {error, invalid} |
pis.format#["0000000000"] | "000.00000.00" | expected "000.00000.00", threw: {error, invalid} |
pis.format#["000000000000"] | "000.00000.00-0" | expected "000.00000.00-0", threw: {error, invalid} |
pis.format#["000.0"] | "000.0" | expected "000.0", threw: {error, invalid} |
pis.format#["000.00"] | "000.00" | expected "000.00", threw: {error, invalid} |
pis.format#["000.000"] | "000.000" | expected "000.000", threw: {error, invalid} |
pis.format#["000.0000"] | "000.0000" | expected "000.0000", threw: {error, invalid} |
pis.format#["000.00000"] | "000.00000" | expected "000.00000", threw: {error, invalid} |
pis.format#["000.000000"] | "000.00000.0" | expected "000.00000.0", threw: {error, invalid} |
pis.format#["000.00000.0"] | "000.00000.0" | expected "000.00000.0", threw: {error, invalid} |
pis.format#["000.00000.00"] | "000.00000.00" | expected "000.00000.00", threw: {error, invalid} |
pis.format#["000.00000.000"] | "000.00000.00-0" | expected "000.00000.00-0", threw: {error, invalid} |
pis.format#["000.00000.00-0"] | "000.00000.00-0" | expected "000.00000.00-0", threw: {error, invalid} |
pis.format#["000.00000.00-00"] | "000.00000.00-0" | expected "000.00000.00-0", threw: {error, invalid} |
pis.format#["000#Error*&@#0000#Char!00000"] | "000.00000.00-0" | expected "000.00000.00-0", threw: {error, invalid} |
pis.format#["#-+Error#000000000000#Char!"] | "000.00000.00-0" | expected "000.00000.00-0", threw: {error, invalid} |
pis.format#["000000#+_Error#Char!$#000000"] | "000.00000.00-0" | expected "000.00000.00-0", threw: {error, invalid} |
pis.format#[1] | "1" | expected "1", threw: error:function_clause |
pis.format#[10] | "10" | expected "10", threw: error:function_clause |
pis.format#[100] | "100" | expected "100", threw: error:function_clause |
pis.format#[1000] | "100.0" | expected "100.0", threw: error:function_clause |
pis.format#[10000] | "100.00" | expected "100.00", threw: error:function_clause |
pis.format#[100000] | "100.000" | expected "100.000", threw: error:function_clause |
pis.format#[1000000] | "100.0000" | expected "100.0000", threw: error:function_clause |
pis.format#[10000000] | "100.00000" | expected "100.00000", threw: error:function_clause |
pis.format#[100000000] | "100.00000.0" | expected "100.00000.0", threw: error:function_clause |
pis.format#[1000000000] | "100.00000.00" | expected "100.00000.00", threw: error:function_clause |
pis.format#[10000000000] | "100.00000.00-0" | expected "100.00000.00-0", threw: error:function_clause |
pis.format#[100000000000] | "100.00000.00-0" | expected "100.00000.00-0", threw: error:function_clause |
pis.format#[1000000000000] | "100.00000.00-0" | expected "100.00000.00-0", threw: error:function_clause |
pis.format#[100.1] | "" | expected "", threw: error:function_clause |
pis.format#[100.11] | "" | expected "", threw: error:function_clause |
pis.format#[100.101] | "" | expected "", threw: error:function_clause |
pis.format#[100.1001] | "" | expected "", threw: error:function_clause |
pis.format#[100.10001] | "" | expected "", threw: error:function_clause |
pis.format#[100.100001] | "" | expected "", threw: error:function_clause |
pis.format#[100.1000001] | "" | expected "", threw: error:function_clause |
pis.format#[100.10000001] | "" | expected "", threw: error:function_clause |
pis.format#[100.100000001] | "" | expected "", threw: error:function_clause |
pis.format#["0000000000000"] | "000.00000.00-0" | expected "000.00000.00-0", threw: {error, invalid} |
pis.format#["00000000000000"] | "000.00000.00-0" | expected "000.00000.00-0", threw: {error, invalid} |
pis.format#["000000000000000"] | "000.00000.00-0" | expected "000.00000.00-0", threw: {error, invalid} |
pis.format#[-12345678901] | "" | expected "", threw: error:function_clause |
pis.format#[9007199254740992] | "" | expected "", threw: error:function_clause |
pis.format#["12345678901"] | "123.45678.90-1" | expected "123.45678.90-1", threw: {error, invalid} |
pis.isValid#repeated-digits | false | true |
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 |
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 |
voterId.format#[""] | "" | expected "", threw: {error, invalid} |
voterId.format#["1"] | "1" | expected "1", threw: {error, invalid} |
voterId.format#["12"] | "12" | expected "12", threw: {error, invalid} |
voterId.format#["123"] | "123" | expected "123", threw: {error, invalid} |
voterId.format#["1234"] | "1234" | expected "1234", threw: {error, invalid} |
voterId.format#["12345"] | "1234 5" | expected "1234 5", threw: {error, invalid} |
voterId.format#["123456"] | "1234 56" | expected "1234 56", threw: {error, invalid} |
voterId.format#["1234567"] | "1234 567" | expected "1234 567", threw: {error, invalid} |
voterId.format#["12345678"] | "1234 5678" | expected "1234 5678", threw: {error, invalid} |
voterId.format#["123456780"] | "1234 5678 0" | expected "1234 5678 0", threw: {error, invalid} |
voterId.format#["1234567801"] | "1234 5678 01" | expected "1234 5678 01", threw: {error, invalid} |
voterId.format#["12345678012"] | "1234 5678 01 2" | expected "1234 5678 01 2", threw: {error, invalid} |
voterId.format#["123456780124"] | "1234 5678 01 24" | expected "1234 5678 01 24", threw: {error, invalid} |
voterId.format#["1234567880191"] | "1234 5678 80 19" | expected "1234 5678 80 19", threw: {error, invalid} |
voterId.format#["1234567880299"] | "1234 5678 80 29" | expected "1234 5678 80 29", threw: {error, invalid} |
voterId.format#["12345678801912"] | "1234 5678 80 19" | expected "1234 5678 80 19", threw: {error, invalid} |
voterId.format#["123456788019123"] | "1234 5678 80 19" | expected "1234 5678 80 19", threw: {error, invalid} |
voterId.format#["12345678803991"] | "1234 5678 80 39" | expected "1234 5678 80 39", threw: {error, invalid} |
voterId.format#["1234567880399"] | "1234 5678 80 39" | expected "1234 5678 80 39", threw: {error, invalid} |
voterId.format#["123456788"] | "1234 5678 8" | expected "1234 5678 8", threw: {error, invalid} |
voterId.format#["123456788019"] | "1234 5678 80 19" | expected "1234 5678 80 19", threw: {error, invalid} |
voterId.format#["123450159"] | "1234 5015 9" | expected "1234 5015 9", threw: {error, invalid} |
voterId.format#[-123456780124] | "" | expected "", threw: error:function_clause |
voterId.format#[1.5] | "" | expected "", threw: error:function_clause |
voterId.format#[9007199254740992] | "" | expected "", threw: error:function_clause |
voterId.format#["123456780175"] | "1234 5678 01 75" | expected "1234 5678 01 75", threw: {error, invalid} |
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 |
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.
- License plate: Get format
licensePlate.getFormat - Phone: Format
phone.format
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/erlang/)