@@ -139,13 +139,14 @@ |
||
139 | 139 | ['code'], |
140 | 140 | function ($attribute) { |
141 | 141 | if (!preg_match('/^[a-zA-Z]{1}[a-zA-Z0-9]{1,255}$/', |
142 | - $this->$attribute)) |
|
143 | - //if(!preg_match('/(^|.*\])([\w\.]+)(\[.*|$)/', $this->$attribute)) |
|
142 | + $this->$attribute)) { |
|
143 | + //if(!preg_match('/(^|.*\])([\w\.]+)(\[.*|$)/', $this->$attribute)) |
|
144 | 144 | { |
145 | 145 | $this->addError($attribute, \Yii::t('skeeks/cms', |
146 | 146 | 'Use only letters of the alphabet in lower or upper case and numbers, the first character of the letter (Example {code})', |
147 | 147 | ['code' => 'code1'])); |
148 | 148 | } |
149 | + } |
|
149 | 150 | } |
150 | 151 | ], |
151 | 152 |