Skip to content

Latest commit

 

History

History
executable file
·
31 lines (23 loc) · 637 Bytes

README.md

File metadata and controls

executable file
·
31 lines (23 loc) · 637 Bytes

Yii2 Mexico Data Validators (yii2-mexvalidators)

Validators for two data strings used in Mexico for identity, RFC and CURP, for use with the Yii 2.* framework.

Installation

Add dependency to your composer.json file:

{
    "require": {
        "jcabanillas/yii2-mexvalidators": "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()],
    ];
}