Browse Source

bug fix of form generator.

tags/2.0.0-beta
Qiang Xue 11 years ago
parent
commit
6978a6803f
  1. 2
      framework/yii/gii/generators/form/Generator.php

2
framework/yii/gii/generators/form/Generator.php

@ -63,7 +63,7 @@ class Generator extends \yii\gii\Generator
array('modelClass, viewName, scenarioName, viewPath', 'filter', 'filter' => 'trim'),
array('modelClass, viewName, viewPath', 'required'),
array('modelClass', 'match', 'pattern' => '/^[\w\\\\]*$/', 'message' => 'Only word characters and backslashes are allowed.'),
array('modelClass', 'validateClass', 'extends' => Model::className()),
array('modelClass', 'validateClass', 'params' => array('extends' => Model::className())),
array('viewName', 'match', 'pattern' => '/^\w+[\\-\\/\w]*$/', 'message' => 'Only word characters, dashes and slashes are allowed.'),
array('viewPath', 'match', 'pattern' => '/^@?\w+[\\-\\/\w]*$/', 'message' => 'Only word characters, dashes, slashes and @ are allowed.'),
array('viewPath', 'validateViewPath'),

Loading…
Cancel
Save