change gii input maxlength value to true

this is then copied from the validator automatically

close #7596
This commit is contained in:
Aleksey Loban
2015-03-06 08:57:03 +03:00
committed by Carsten Brandt
parent cd0093f7bd
commit 0cea115c81

View File

@ -250,7 +250,7 @@ class Generator extends \yii\gii\Generator
} elseif ($column->phpType !== 'string' || $column->size === null) { } elseif ($column->phpType !== 'string' || $column->size === null) {
return "\$form->field(\$model, '$attribute')->$input()"; return "\$form->field(\$model, '$attribute')->$input()";
} else { } else {
return "\$form->field(\$model, '$attribute')->$input(['maxlength' => $column->size])"; return "\$form->field(\$model, '$attribute')->$input(['maxlength' => true])";
} }
} }
} }