Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 609 Bytes

README.md

File metadata and controls

37 lines (26 loc) · 609 Bytes

Yii 2 credit card validation

credit card validation yii 2

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist bryglen/yii2-validators "1.0.1"

or add

"bryglen/yii2-validator": "1.0.1"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your models :

public function rules()
{
    return [
        ['cc', 'bryglen\validators\CreditCardValidator']
    ];
}