diff --git a/CHANGELOG.md b/CHANGELOG.md index 8641e87..61410a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Yii Framework 2 bootstrap5 extension Change Log ----------------------- - Bug #6: yii\bootstrap5\BaseHtml::staticControl(): Argument #1 ($value) must be of type string, int given (dicrtarasov) +- 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 7e0ad82..0c150db 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; @@ -382,7 +382,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;