PHP Classes

CPF/CNPJ Validation: Validation of Brazilian CPF/CNPJ numbers

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 1,373 All time: 2,831 This week: 673Up
Version License PHP version Categories
cpf_cnpj_validation 1.0GNU General Publi...3Text processing, Finances, Validation


This package is specific mainly for applications used in Brazil Brazil .

This class can perform validation of Brazilian CPF/CNPJ numbers.

It takes a given CPF or CNPJ number, removes any separator characters ( . - / ) and computes the checksum of the remaining digits to determine if the number can be valid.

The class returns true or false depending on whether the number was found to be valid.

In Portuguese:

Esta classe pode validar números de CPF e CNPJ.

A classe pega em um dado CPF ou CNPJ, remove caracteres separadores como . - e /, e calcula a soma dos dígitos restantes para verificar se o número pode ser válido.

A classe retorna verdadeiro ou falso dependendo se o número pode ser válido ou não.

Picture of André Cupini
  Performance   Level  
Name: André Cupini <contact>
Classes: 6 packages by
Country: Brazil Brazil
Age: 42
All time rank: 854 in Brazil Brazil
Week rank: 264 Down19 in Brazil Brazil Down

  Files folder image Files  
File Role Description
Plain text file class_VALIDATE.php Class All the functions are here
Accessible without login Plain text file example.php Example Example of as to use the validation functions

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:2,831
This week:673Up