PHP CPF Validation: Validate Brazilian tax payer numbers with Laravel

Recommend this page to a friend!
  Info   View files Documentation   View files View files (10)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 6 All time: 10,065 This week: 349Up
Version License PHP version Categories
cpf-validator 1.0MIT/X Consortium ...5PHP 5, Libraries, Validation
Description Author
This package is specific mainly for applications used in Brazil Brazil .

This package can be used to validate Brazilian tax payer numbers with Laravel.

It provides one class that can validate a Brazilian tax payer numbers by performing a calculation that is verified against check digits.

The package also provides a Laravel service provide class, so the validation process can be integrated in Laravel applications.

Picture of Thiago Przyczynski
  Performance   Level  
Name: Thiago Przyczynski <contact>
Classes: 8 packages by
Country: Brazil Brazil
Age: 31
All time rank: 3666289 in Brazil Brazil
Week rank: 28 Up2 in Brazil Brazil Up
Innovation award
Innovation award
Nominee: 3x

Details

CPF Validator

A Laravel package to work with CPF validation.

CPF is an individual taxpayer identification number given to people living in Brazil, both native Brazilians and resident foreigners.

Installation

` composer install thiagoprz/cpf-validator`

Usage

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class CpfController extends Controller
{
    ...
    /
     * Store action
     */
    public function store(Request $request)
    {
        $this->validate($request, [
            'cpf' => 'cpf', // CPF validation
            ...
        ]);
        ...
    }
    ...
}
  Files folder image Files  
File Role Description
Files folder imagesrc (2 files, 1 directory)
Files folder imagetests (2 files)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Read me

  Files folder image Files  /  src  
File Role Description
Files folder imagelang (2 directories)
  Plain text file Cpf.php Class Class source
  Plain text file CpfServiceProvider.php Class Class source

  Files folder image Files  /  src  /  lang  
File Role Description
Files folder imageen (1 file)
Files folder imagept-BR (1 file)

  Files folder image Files  /  src  /  lang  /  en  
File Role Description
  Accessible without login Plain text file validation.php Aux. Auxiliary script

  Files folder image Files  /  src  /  lang  /  pt-BR  
File Role Description
  Accessible without login Plain text file validation.php Aux. Auxiliary script

  Files folder image Files  /  tests  
File Role Description
  Plain text file CpfTest.php Class Class source
  Plain text file TestCase.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:6
This week:0
All time:10,065
This week:349Up

For more information send a message to info at phpclasses dot org.