Model validation messages are not shown

First of all, peaces of code that I have:




Information model:


    public $age;

    ...


    public function rules()

    {

        return [

            [['age'], 'number'],

            [['age'], 'required'],

            ...

        ];

    }



In controller:




$informationModel = new Information();


$form = $this->renderPartial('@app/views/products/Forms/informationForm', [

   'infoModel' => $informationModel,

   ...

]);




In informationForm view:




$form = ActiveForm::begin(['options' => ['class'=>'defaultForm', 'id' => 'infoForm']]);


   $this->beginBlock('ageInput');

   $form->field($infoModel, 'age', [])->label(false);

   <?php $this->endBlock(); ?>

   ...


ActiveForm::end();



And my problem:

Form is rendered, everything’s fine with it.

In source code I see that help divs abot input fields are generated (by Yii) fine.

But the problem - I can’t get validation errors. In other forms it works fine, but here.

Main difference is that this time I use $this->beginBlock(); and in other view I show that blocks.

Maybe someone knows if those beginBlock() can somehow block valdiations.

All opinions would be helpful.

I self find out that yes - beginBlock() disables validation. But the problem how to enable it - still exists…