Provide validations and features for brazilian localization

Installs: 35

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

v1.0.2 2020-09-25 17:00 UTC

This package is auto-updated.

Last update: 2024-03-26 00:17:18 UTC


README

Yii2 Extension - validador de PIS/Pasep para Brasil

  • Pis

Yii2 Latest Stable Version Total Downloads

Installation with Composer

If you're using Composer to manage dependencies, you can use

$ composer require jeffersoncarvalho/validator

or you can include the following in your composer.json file:

{
    "require": {
        "jeffersoncarvalho/validator": "~1.0"
    }
}

Usage

Add the rules as the following example

use Yii;
use yii\base\Model;
use jeffersoncarvalho\validator\PisPasepValidator

class PessoaForm extends Model
{
	public $pis;

	/**
	* @return array the validation rules.
	*/
	public function rules()
	{
		return [
			// PIS validator
			['pis', PisPasepValidator::className()],
		];
	}
}