Swift Library for validation and generation of CPF and CNPJ numbers.
Swift Library for validation and generation of CPF and CNPJ numbers 🇧🇷.
do {
let cpf = try CPF(number: "51135733961")
cpf.isValid() // true
} catch Parser.InputError.invalidFormat {
print("invalid CPF format")
}
let cpf = CPF.generate()