PHPackages                             springy-framework/brazilian-numbers - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. springy-framework/brazilian-numbers

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

springy-framework/brazilian-numbers
===================================

PHP class for validate and check brazilian document and numbers

v2.0.0(1y ago)1294↓33.3%MITPHPPHP ^8.1

Since Nov 30Pushed 1y ago1 watchersCompare

[ Source](https://github.com/springy-framework/brazilian-numbers)[ Packagist](https://packagist.org/packages/springy-framework/brazilian-numbers)[ Docs](https://github.com/springy-framework/brazilian-numbers)[ RSS](/packages/springy-framework-brazilian-numbers/feed)WikiDiscussions 2.0 Synced 1mo ago

READMEChangelog (8)Dependencies (4)Versions (10)Used By (0)

PHP Brazilian Numbers Validation
================================

[](#php-brazilian-numbers-validation)

This package can validate documents like CPF, CNPJ, CNH, NIS and "inscrição estadual".

It can take the strings with the numbers of documents of people and companies from Brazil and perform format and check digit verifications to determine if they can be valid.

[![Latest Stable Version](https://camo.githubusercontent.com/f61dcab51566b7b9403a9af4d14eb54e246504c89c216cca7922fa498efa70ab/68747470733a2f2f706f7365722e707567782e6f72672f737072696e67792d6672616d65776f726b2f6272617a696c69616e2d6e756d626572732f762f737461626c65)](https://packagist.org/packages/springy-framework/brazilian-numbers)[![Tests](https://github.com/springy-framework/brazilian-numbers/actions/workflows/php.yml/badge.svg)](https://github.com/springy-framework/brazilian-numbers/actions/workflows/php.yml)[![Total Downloads](https://camo.githubusercontent.com/df683564072f69fdd5ebd4cac439ae9e1f1d6d7ca0aedc03caf1ae732b204b92/68747470733a2f2f706f7365722e707567782e6f72672f737072696e67792d6672616d65776f726b2f6272617a696c69616e2d6e756d626572732f646f776e6c6f616473)](https://packagist.org/packages/springy-framework/brazilian-numbers)[![License](https://camo.githubusercontent.com/71e5efb8090245f35b8469534001e9a3a68a448d56bc3c898d9d079173dec067/68747470733a2f2f706f7365722e707567782e6f72672f737072696e67792d6672616d65776f726b2f6272617a696c69616e2d6e756d626572732f6c6963656e7365)](https://packagist.org/packages/springy-framework/brazilian-numbers)

Requirements
------------

[](#requirements)

- PHP 8.1+

Instalation
-----------

[](#instalation)

To get the latest stable version of this component use:

```
"require": {
    "springy-framework/brazilian-numbers": "*"
}
```

in your composer.json file.

Usage
-----

[](#usage)

I suppose that the following example is all you need:

```
