Commit 14e4e836 by suralc

Fixed regex-escaping in crudgenerator

parent eac0922f
......@@ -67,7 +67,7 @@ class Generator extends \yii\gii\Generator
[['modelClass'], 'validateClass', 'params' => ['extends' => BaseActiveRecord::className()]],
[['baseControllerClass'], 'validateClass', 'params' => ['extends' => Controller::className()]],
[['controllerClass'], 'match', 'pattern' => '/Controller$/', 'message' => 'Controller class name must be suffixed with "Controller".'],
[['controllerClass'], 'match', 'pattern' => '/[A-Z0-9][^\\]+Controller$/', 'message' => 'Controller class name must start with an uppercase letter.'],
[['controllerClass'], 'match', 'pattern' => '/(^|\\\\)[A-Z0-9][^\\\\]+Controller$/', 'message' => 'Controller class name must start with an uppercase letter.'],
[['controllerClass', 'searchModelClass'], 'validateNewClass'],
[['indexWidgetType'], 'in', 'range' => ['grid', 'list']],
[['modelClass'], 'validateModelClass'],
......
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