Skip to content

Representation and validation of brazilian document numbers and other related stuff

License

Notifications You must be signed in to change notification settings

base4sistemas/br

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Dart library for validation of common document types used in Brazil to identify companies (CNPJ for legal persons) and individuals (CPF for physical persons) as well as other related stuff, such as brazilian states information.

Usage

A simple usage example:

import 'package:br/br.dart';

main() {
  var cnpj = Cnpj.fromString('00.000.000/0001-91');
  var cpf = Cpf.fromString('123.456.789-09');

  print('This company is ${cnpj.isBranch() ? 'the head office' : 'a branch'}!');
  print('VP company CPF is ${cpf.format()}');
  print('"SP" is the State of ${getState('SP').name}');
}

See example/ folder for more.

About

Representation and validation of brazilian document numbers and other related stuff

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages