PHP Classes

PHP CPF Validation: Validate Brazilian tax payer numbers with Laravel

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 13 All time: 11,461 This week: 206Up
Version License PHP version Categories
cpf-validator 1.0.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: 16 packages by
Country: Brazil Brazil
Innovation award
Innovation award
Nominee: 8x

Documentation

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 (10)  
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 (10)  /  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 (10)  /  src  /  lang  
File Role Description
Files folder imageen (1 file)
Files folder imagept-BR (1 file)

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

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

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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:13
This week:0
All time:11,461
This week:206Up