diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f3fdf1..fc1895e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ Yii Framework 2 bootstrap5 extension Change Log 2.0.2 under development ----------------------- -- no changes in this release. +- Bug #9: fixed default ActiveField::hintOptions (dicrtarasov) 2.0.1 August 11, 2021 diff --git a/src/ActiveField.php b/src/ActiveField.php index 8cc8655..353df0d 100644 --- a/src/ActiveField.php +++ b/src/ActiveField.php @@ -156,7 +156,7 @@ class ActiveField extends \yii\widgets\ActiveField /** * {@inheritdoc} */ - public $hintOptions = ['class' => ['widget' => 'form-text', 'text-muted'], 'tag' => 'small']; + public $hintOptions = ['class' => ['widget' => 'form-text', 'text-muted'], 'tag' => 'div']; /** * @var null|array CSS grid classes for horizontal layout. This must be an array with these keys: * - 'offset' the offset grid class to append to the wrapper if no label is rendered @@ -494,7 +494,7 @@ class ActiveField extends \yii\widgets\ActiveField { $config = [ 'hintOptions' => [ - 'tag' => 'small', + 'tag' => 'div', 'class' => ['form-text', 'text-muted'], ], 'errorOptions' => [ diff --git a/tests/ActiveFormTest.php b/tests/ActiveFormTest.php index 7782109..4abfd3f 100644 --- a/tests/ActiveFormTest.php +++ b/tests/ActiveFormTest.php @@ -291,7 +291,7 @@ HTML;
-Your username must be at least 4 characters long +
Your username must be at least 4 characters long
HTML; @@ -299,7 +299,7 @@ HTML;
-Your password must be 8-20 characters long, contain letters and numbers, and must not contain spaces, special characters, or emoji. +
Your password must be 8-20 characters long, contain letters and numbers, and must not contain spaces, special characters, or emoji.
HTML; @@ -330,7 +330,7 @@ HTML;
-Your username must be at least 4 characters long +
Your username must be at least 4 characters long
Username cannot be blank.
HTML;