2017 © Pedro PelĂĄez
 

library agv-validator

CPF and CNPJ Validators and View Helpers for ZF2.

image

albertogviana/agv-validator

CPF and CNPJ Validators and View Helpers for ZF2.

  • Wednesday, August 12, 2015
  • by leonardomdornelas
  • Repository
  • 1 Watchers
  • 1 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

AgvValidator

MĂłdulo criado para Zend Framework 2, ele possuĂ­ Validators e Helpers para CPF e CPNJ que podem ser utilizados maneira:, (*1)

Habilite o mĂłdulo AgvValidator no conf/application.config.php, (*2)

Validators:, (*3)

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:, (*4)

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

The Versions

12/08 2015

dev-master

9999999-dev

CPF and CNPJ Validators and View Helpers for ZF2.

  Sources   Download

The Requires

  • php >=5.3.0

 

by Alberto Viana