PHP code example of mero / br-validator-bundle
1. Go to this page and download the library: Download mero/br-validator-bundle library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mero / br-validator-bundle example snippets
use Mero\Bundle\BrValidatorBundle\Validator\Constraints as BrAssert;
class People
{
/**
* @var string Brazilian individual registration
*
* @BrAssert\CPF()
*/
private $cpf;
/**
* @var string Brazilian corporate registration
*
* @BrAssert\CNPJ()
*/
private $cnpj;
/**
* @var string Brazilian national driving license
*
* @BrAssert\CNH()
*/
private $cnh;
}