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