Commit 3cdd78ca by slavcodev

Fix rules generator

parent 1c2489a3
......@@ -237,10 +237,10 @@ class Generator extends \yii\gii\Generator
$rules = [];
foreach ($types as $type => $columns) {
$rules[] = "['" . implode(', ', $columns) . "', '$type']";
$rules[] = "[['" . implode(', ', $columns) . "'], '$type']";
}
foreach ($lengths as $length => $columns) {
$rules[] = "['" . implode(', ', $columns) . "', 'string', 'max' => $length]";
$rules[] = "[['" . implode(', ', $columns) . "'], 'string', 'max' => $length]";
}
return $rules;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment