CnpjCpfBase class abstract

Abstract base class to handle validations on CNPJ and CPF documents

Constructors

CnpjCpfBase()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

cnpjValidate(String value) EDocumentStatus
Returns the CNPJ document Status by the enum EDocumentStatus
cpfValidate(String value) EDocumentStatus
Returns the CPF document Status by the enum EDocumentStatus
isCnpjValid(String value) bool
Returns if CNPJ document is valid
isCpfValid(String value) bool
Returns if CPF document is valid
maskCnpj(String value) String
Returns the given value masquerade like CNPJ
maskCpf(String value) String
Returns the given value masquerade like CPF
onlyNumbers(String? value) String
Removes all non-number characters from string
randomCnpj({bool withMask = false}) String
Generates a random CNPJ. Just for tests
randomCpf({bool withMask = false}) String
Generates a random CPF. Just for tests