jeffersoncarvalho / validator
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
Requires
- yiisoft/yii2: ~2.0.13
This package is auto-updated.
Last update: 2024-10-26 01:45:52 UTC
README
Yii2 Extension - validador de PIS/Pasep para Brasil
- Pis
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()],
];
}
}