Skip to content

Módulo criado para Zend Framework 2, ele possuí Validators e Helpers para CPF e CNPJ.

Notifications You must be signed in to change notification settings

igui-br/AgvValidator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AgvValidator

Módulo criado para Zend Framework 2, ele possuí Validators e Helpers para CPF e CPNJ que podem ser utilizados maneira:

Habilite o módulo AgvValidator no conf/application.config.php

Validators:

public function getInputFilterSpecification()
{
    return array(
    	// Valida CNPJ
        'cnpj' => array(
            'required' => true,
            'filters' => array(
                array('name' => 'Digits'),
            ),
            'validators' => array(
                array(
                    'name' => 'AgvValidator\Validator\Cnpj',
                ),
            ),
        ),

        // Valida CPF
        'cpf' => array(
            'required' => true,
            'filters' => array(
                array('name' => 'Digits'),
            ),
            'validators' => array(
                array(
                    'name' => 'AgvValidator\Validator\Cpf',
                ),
            ),
        ),
    );
}

Helper usado nas views:

$this->cnpjMask('96268838000130');
$this->cpfMask('83411671238');

About

Módulo criado para Zend Framework 2, ele possuí Validators e Helpers para CPF e CNPJ.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%