Horje
Yii2 Inarray Validator

 

Download
File:
PHP
Size:
14 bytes
Extension:
zip
in_array validator for Yii 2

README

Yii validator that checks if model attribute is in given array.

How to use?

Installation with Composer

Just add the line under require object in your composer.json file.

{
  "require": {
    "nuffic/yii2-inarray-validator" : "dev-master"
  }
}

then run

$> composer update

Usage


    use nuffic\validators\InArrayValidator;

    public function rules() {
        return [
            [['find_me'], InArrayValidator::className(), 'array' => ['my', 'super', 'awesome', 'array']],
        ];
    }



PHP

Related
Informatique Security Bundle Informatique Security Bundle
Open Popo Open Popo
Sencha Bundle Sencha Bundle
Phpunit Ext Phpunit Ext
Yii Helpers Yii Helpers

Type:
Package
Category:
Download
Sub Category:
PHP
Uploaded by:
Admin
Views:
18