yii2-bootstrap4
yii2-bootstrap4 copied to clipboard
field id attribute placed on incorrect element for custom-control fields
class TestModel extends Model
{
public $myfield;
}
$model = new TestModel(['myfield' => 1]);
$form = ActiveForm::begin();
echo $form->field($model, 'myfield')->radioList([ 1 => 1, 2 => 2]);
Produce this HTML:

Where id attribute is placed on div, but yii.validation.js working with input by id. This marking is not supported by yii.validation.js and activeform.js.
Client-side validation not working with such fields :(