2017 © Pedro PelĂĄez
 

yii2-extension yii2-br-validator

Provide validations and features for brazilian localization

image

yiibr/yii2-br-validator

Provide validations and features for brazilian localization

  • Tuesday, November 8, 2016
  • by yiibr
  • Repository
  • 4 Watchers
  • 8 Stars
  • 18,746 Installations
  • PHP
  • 5 Dependents
  • 0 Suggesters
  • 7 Forks
  • 0 Open issues
  • 3 Versions
  • 6 % Grown

The README.md

Yii2 Brazilian Validators

Yii2 Extension that provide validators and features for brazilian localization, (*1)

  • CPF: Cadastro de pessoa fĂ­sica (like a Security Social Numeber in USA)
  • CNPJ: Cadastro nacional de pessoa jurĂ­dica
  • CEI: Cadastro especĂ­fico no INSS (nĂșmero de matrĂ­cula)

Yii2 Latest Stable Version Build Status Scrutinizer Code Quality Code Coverage Total Downloads, (*2)

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

php composer.phar require --prefer-dist yiibr/yii2-br-validator "*"

or add, (*5)

"yiibr/yii2-br-validator": "*"

to the require section of your composer.json file., (*6)

Usage

Add the rules as the following example, (*7)


use Yii; use yii\base\Model; use yiibr\brvalidator\CpfValidator; use yiibr\brvalidator\CnpjValidator; use yiibr\brvalidator\CeiValidator; class PersonForm extends Model { public $name; public $cpf; public $cnpj; public $cei; /** * @return array the validation rules. */ public function rules() { return [ // name is required ['name', 'required'], // cpf validator ['cpf', CpfValidator::className()], // cnpj validator ['cnpj', CnpjValidator::className()], // cei validator ['cei', CeiValidator::className()] ]; } }

The Versions

08/11 2016

dev-master

9999999-dev

Provide validations and features for brazilian localization

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

validator model yii brazil brasil cnpj cpf br

26/08 2015

1.0.1

1.0.1.0

Provide validations and features for brazilian localization

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

validator model yii brazil brasil cnpj cpf br

28/11 2014

1.0.0

1.0.0.0

Provide validations and features for brazilian localization

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

validator model yii brazil brasil cnpj cpf br