jcabanillas/yii2-pervalidators

Two data validators for Peru-specific data: RUC.

dev-master 2021-07-22 16:08 UTC

This package is auto-updated.

Last update: 2024-04-22 22:45:01 UTC


README

Validators for two data strings used in Peru for identity, RUC, for use with the Yii 2.* framework.

Installation

Add dependency to your composer.json file:

{
    "require": {
        "jcabanillas/yii2-rucvalidators": "0.0.1"
    }
}

Usage

In order to use the validator, you need to provide the full path to the validator in the model:

public function rules()
{
    return [
       [['rfc'], RfcValidator::className()],
       [['curp'], CurpValidator::className()],
    ];
}