PHPackages                             mero/br-validator-bundle - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. mero/br-validator-bundle

AbandonedArchivedSymfony-bundle[Validation &amp; Sanitization](/categories/validation)

mero/br-validator-bundle
========================

Bundle for Symfony with validators for Brazilian location.

1.1.0(10y ago)072MITPHPPHP &gt;=5.5.9

Since Jun 22Pushed 9y ago1 watchersCompare

[ Source](https://github.com/merorafael/MeroBrValidatorBundle)[ Packagist](https://packagist.org/packages/mero/br-validator-bundle)[ Docs](https://github.com/merorafael/MeroBrValidatorBundle)[ RSS](/packages/mero-br-validator-bundle/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (4)Versions (3)Used By (0)

MeroBrValidatorBundle
=====================

[](#merobrvalidatorbundle)

[![SensioLabsInsight](https://camo.githubusercontent.com/877a7473a31947bf9d869c07c689f637b0f4a714cb2f77676ed57dd3d4984339/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f66646134313238652d333839312d343531622d383061392d6139383233363564316337622f6d696e692e706e67)](https://insight.sensiolabs.com/projects/fda4128e-3891-451b-80a9-a982365d1c7b)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/31396703efa0e2a158b189791f111292b94f69236ef9e095f58712ff5ca3bb71/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d65726f72616661656c2f4d65726f427256616c696461746f7242756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/merorafael/MeroBaseBundle/?branch=master)[![Build Status](https://camo.githubusercontent.com/be1a88295c51c54ed260a08f3304571db9a45cfeb83e49f80643604199a4a42b/68747470733a2f2f7472617669732d63692e6f72672f6d65726f72616661656c2f4d65726f427256616c696461746f7242756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/merorafael/MeroBrValidatorBundle)[![Latest Stable Version](https://camo.githubusercontent.com/5c22b6e3f8b9336a9a9fae9a6bb58883a04cb9bbfbfb39039e8c1f33696322c7/68747470733a2f2f706f7365722e707567782e6f72672f6d65726f2f62722d76616c696461746f722d62756e646c652f762f737461626c652e737667)](https://packagist.org/packages/mero/br-validator-bundle)[![Total Downloads](https://camo.githubusercontent.com/7d72400d64e5fd7d5afc52fd50faf832c64daf5f1cdfceb5093a801b06462335/68747470733a2f2f706f7365722e707567782e6f72672f6d65726f2f62722d76616c696461746f722d62756e646c652f646f776e6c6f6164732e737667)](https://packagist.org/packages/mero/br-validator-bundle)[![License](https://camo.githubusercontent.com/01161b1d56349e2abf0eba42f6be43f26ecb5be9dc6a06fba5964e6ff7ad1e63/68747470733a2f2f706f7365722e707567782e6f72672f6d65726f2f62722d76616c696461746f722d62756e646c652f6c6963656e73652e737667)](https://packagist.org/packages/mero/br-validator-bundle)

Bundle for Symfony with validators for Brazilian location.

Requeriments
------------

[](#requeriments)

- PHP 5.4.9 or above
- Symfony 2.8 or above(including Symfony 3)

Instalation with composer
-------------------------

[](#instalation-with-composer)

1. Open your project directory;
2. Run `composer require mero/br-validator-bundle` to add MeroBrValidatorBundle in your project vendor;
3. Open **my/project/dir/app/AppKernel.php**;
4. Add `Mero\Bundle\BrValidatorBundle\MeroBrValidatorBundle()`.

Symfony validators
------------------

[](#symfony-validators)

Applies toOptionsClassValidatorDescription[property or method](http://symfony.com/doc/current/book/validation.html#validation-property-target)message[CPF](https://github.com/merorafael/MeroBrValidatorBundle/blob/master/Validator/Constraints/CPF.php)[CPFValidator](https://github.com/merorafael/MeroBrValidatorBundle/blob/master/Validator/Constraints/CPFValidator.php)Validates number of CPF(individual registration)[property or method](http://symfony.com/doc/current/book/validation.html#validation-property-target)message[CNH](https://github.com/merorafael/MeroBrValidatorBundle/blob/master/Validator/Constraints/CNH.php)[CNHValidator](https://github.com/merorafael/MeroBrValidatorBundle/blob/master/Validator/Constraints/CNHValidator.php)Validates number of CNH(national driving license)[property or method](http://symfony.com/doc/current/book/validation.html#validation-property-target)message[CNPJ](https://github.com/merorafael/MeroBrValidatorBundle/blob/master/Validator/Constraints/CNPJ.php)[CNPJValidator](https://github.com/merorafael/MeroBrValidatorBundle/blob/master/Validator/Constraints/CNPJValidator.php)Validates number of CNPJ(corporate registration)### Basic usage

[](#basic-usage)

```
