2017 © Pedro Peláez
 

library yii2-luhn-validator

Luhn validate

image

padavvan/yii2-luhn-validator

Luhn validate

  • Wednesday, July 12, 2017
  • by padaVVan
  • Repository
  • 2 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Standalone Luhn validator for Yii2

Checking the number by Luhn algorithm. Look more about Luhn algorithm at wikipedia., (*1)

For license information check the LICENSE-file., (*2)

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

php composer.phar require padavvan/yii2-luhn-validator

or add, (*5)

"padavvan/yii2-luhn-validator": "~1.0.2"

to the require section of your composer.json file., (*6)

Usage

Look more about Yii2 validators, (*7)

public function rules() {
  return [
    ['creditCard', LuhnValidator::className()]
  ];
}

// OR
$model = \yii\base\DynamicModel::validateData(['digits' => '...'], [
    ['digits', LuhnValidator::className()]
]);

// OR
LuhnValidator::check($digits); // return true or false

Tests

cd vendor/padavvan/yii2-luhn-validator
php ../../bin/codecept run

The Versions

12/07 2017

dev-master

9999999-dev https://github.com/padaVVan/yii2-luhn-validator

Luhn validate

  Sources   Download

MIT

The Requires

 

The Development Requires

by Oleg Koltsov

yii2 validator luhn

12/07 2017

1.0.2

1.0.2.0 https://github.com/padaVVan/yii2-luhn-validator

Luhn validate

  Sources   Download

MIT

The Requires

 

The Development Requires

by Oleg Koltsov

yii2 validator luhn

12/07 2017

dev-dev

dev-dev https://github.com/padaVVan/yii2-luhn-validator

Luhn validate

  Sources   Download

MIT

The Requires

 

The Development Requires

by Oleg Koltsov

yii2 validator luhn

12/07 2017

1.0.1

1.0.1.0 https://github.com/padaVVan/yii2-luhn-validator

Luhn validate

  Sources   Download

MIT

The Requires

 

The Development Requires

by Oleg Koltsov

yii2 validator luhn