jcabanillas/yii2-mexvalidators

Two data validators for Mexico-specific data: CURP and RFC.

Maintainers

Package info

github.com/jcabanillas/yii2-mexvalidators

Forum

Type:yii-extension

pkg:composer/jcabanillas/yii2-mexvalidators

Statistics

Installs: 434

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-master 2023-01-21 20:21 UTC

This package is auto-updated.

Last update: 2026-03-08 08:29:18 UTC


README

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()],
    ];
}