Commit 6978a680 by Qiang Xue

bug fix of form generator.

parent 89c61c9c
......@@ -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'),
......
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