{"action":"opened","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/7223","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/7223/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/7223/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/7223/events","html_url":"https://github.com/yiisoft/yii2/issues/7223","id":57140702,"number":7223,"title":"not showing validation error message of dropDownList()","user":{"login":"hoa2ng","id":4935019,"avatar_url":"https://avatars.githubusercontent.com/u/4935019?v=3","gravatar_id":"","url":"https://api.github.com/users/hoa2ng","html_url":"https://github.com/hoa2ng","followers_url":"https://api.github.com/users/hoa2ng/followers","following_url":"https://api.github.com/users/hoa2ng/following{/other_user}","gists_url":"https://api.github.com/users/hoa2ng/gists{/gist_id}","starred_url":"https://api.github.com/users/hoa2ng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoa2ng/subscriptions","organizations_url":"https://api.github.com/users/hoa2ng/orgs","repos_url":"https://api.github.com/users/hoa2ng/repos","events_url":"https://api.github.com/users/hoa2ng/events{/privacy}","received_events_url":"https://api.github.com/users/hoa2ng/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-10T07:35:36Z","updated_at":"2015-02-10T07:35:36Z","closed_at":null,"body":"Hello,\r\n\r\nIn controller \r\n```php\r\n public function actionCreate()\r\n    {\r\n    \t$mschedule = new MessageSchedule();\r\n\r\n    \tif ($mschedule->load(Yii::$app->request->post()) && $mschedule->save()) {\r\n    \t\techo Json::encode(['success' => True]);\r\n    \t\texit();\r\n    \t}\r\n    \telse {\r\n    \t\techo \"<pre>\"; var_dump($mschedule->getErrors()); die('$mschedule->getErrors()');\r\n    \t}\r\n    }\r\n```\r\n\r\nin model\r\n\r\n```php\r\n\r\npublic function rules()\r\n    {\r\n        return [\r\n            [['descriptions', 'relation'], 'required'],\r\n            [['relation', 'type', 'event', 'type_periodically'], 'integer'],\r\n            [['descriptions', 'time_periodically'], 'string', 'max' => 255]\r\n        ];\r\n    }\r\n\r\n```\r\n\r\nin View\r\nsetting of form\r\n```php \r\n$form = ActiveForm::begin([\r\n                        'id' => 'form-add-message-schedule',\r\n                        'enableClientValidation' => true,\r\n                        'validateOnSubmit' => true,\r\n                        'options' => [\r\n                            'class'   => 'form-bordered',\r\n                            'data-url' => '/mschedules/create'\r\n                        ],\r\n                        'fieldConfig' => [\r\n                            'horizontalCssClasses' => [\r\n                                'label' => 'col-md-3 control-label',\r\n                            ],\r\n                        ],\r\n      ]); \r\n\r\n```\r\ndropDownList()\r\n\r\n```php\r\n$items_rel = $model->rel_list;\r\necho $form->field($model, 'relation', [\r\n                    \t\t'template' => \"<div class='col-md-3'>{label}</div><div class='col-md-9'>{input}</div>\\n{hint}\\n{error}\"\r\n                    \t])\r\n                        ->dropDownList(\r\n                            $items_rel,          \r\n                            ['prompt'=>'--', 'id' => 'relation1']    \r\n                        );\r\n\r\n```\r\n\r\nand when I printed errors validation\r\n\r\n```php \r\n\r\n<pre>array(1) {\r\n  [\"relation\"]=>\r\n  array(1) {\r\n    [0]=>\r\n    string(25) \"Relation cannot be blank.\"\r\n  }\r\n}\r\n\r\n```\r\n\r\nbut this error message hasn't shown below dropdown tag\r\n\r\nPlease help me. \r\n\r\nThanks"}}