diff --git a/apps/advanced/backend/web/css/site.css b/apps/advanced/backend/web/css/site.css
index 068d5fd407..c9bc751eb5 100644
--- a/apps/advanced/backend/web/css/site.css
+++ b/apps/advanced/backend/web/css/site.css
@@ -76,12 +76,6 @@ a.desc:after {
white-space: nowrap;
}
-.hint-block {
- display: block;
- margin-top: 5px;
- color: #999;
-}
-
.error-summary {
color: #a94442;
background: #fdf7f7;
diff --git a/apps/advanced/frontend/web/css/site.css b/apps/advanced/frontend/web/css/site.css
index 068d5fd407..c9bc751eb5 100644
--- a/apps/advanced/frontend/web/css/site.css
+++ b/apps/advanced/frontend/web/css/site.css
@@ -76,12 +76,6 @@ a.desc:after {
white-space: nowrap;
}
-.hint-block {
- display: block;
- margin-top: 5px;
- color: #999;
-}
-
.error-summary {
color: #a94442;
background: #fdf7f7;
diff --git a/apps/basic/web/css/site.css b/apps/basic/web/css/site.css
index 068d5fd407..c9bc751eb5 100644
--- a/apps/basic/web/css/site.css
+++ b/apps/basic/web/css/site.css
@@ -76,12 +76,6 @@ a.desc:after {
white-space: nowrap;
}
-.hint-block {
- display: block;
- margin-top: 5px;
- color: #999;
-}
-
.error-summary {
color: #a94442;
background: #fdf7f7;
diff --git a/docs/guide/form.md b/docs/guide/form.md
index 2146f1d4fa..34a6c6789e 100644
--- a/docs/guide/form.md
+++ b/docs/guide/form.md
@@ -107,8 +107,8 @@ or
= Html::activeLabel($model, 'username', ['label' => 'name']) ?>
= Html::activeTextInput($model, 'username') ?>
-= Html::error($model, 'username') ?>
Please enter your name
+= Html::error($model, 'username') ?>
```
If you want to use one of HTML5 fields you may specify input type directly like the following:
diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md
index c428dc3fd5..0f0ce84981 100644
--- a/framework/CHANGELOG.md
+++ b/framework/CHANGELOG.md
@@ -121,6 +121,7 @@ Yii Framework 2 Change Log
- Chg #1821: Changed default values for yii\db\Connection username and password to null (cebe)
- Chg #1844: `Response::sendFile()` and other file sending methods will not send the response (qiangxue)
- Chg #1852: DbConnection::tablePrefix default value now 'tbl_' (creocoder)
+- Chg #1856: The default CSS class for hint generated by `ActiveField` is changed to `help-block` (qiangxue, crocoder)
- Chg #1958: `beforeSubmit` in `yii.activeform` is now executed after validation and before form submission (6pblcb)
- Chg #2025: Removed ability to declare scopes in ActiveRecord (samdark)
- Chg #2043:
diff --git a/framework/widgets/ActiveField.php b/framework/widgets/ActiveField.php
index 13e510e428..bb9b0ff04e 100644
--- a/framework/widgets/ActiveField.php
+++ b/framework/widgets/ActiveField.php
@@ -70,7 +70,7 @@ class ActiveField extends Component
*
* - tag: the tag name of the container element. Defaults to "div".
*/
- public $hintOptions = ['class' => 'hint-block'];
+ public $hintOptions = ['class' => 'help-block'];
/**
* @var boolean whether to enable client-side data validation.
* If not set, it will take the value of [[ActiveForm::enableClientValidation]].