Skip to content

mipotech/yii2-israeli-id-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Yii2 Israeli ID Validator

Yii2 Israeli ID Validator

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist mipotech/yii2-israeli-id-validator "*"

or add

"mipotech/yii2-israeli-id-validator": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply add to a model's validation rules as follows:

use mipotech\yii2israelidvalidator\IsraeliIdValidator;

class MyModel extends Model
{
    ...
    public $tz;
    ...
    
    public function rules()
    {
        return [
            ...
            ['tz', IsraeliIdValidator::className()],
            ...
        ];
    }
}

About

Yii2 validator for Israeli citizen ID numbers

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages