Creating Data from a _form

Hello guys In my form I got three fields which are


<?= $form->field($model, 'room_type')->textInput(['maxlength' => true]) ?>


    <?= $form->field($model, 'room_loc')->textInput(['maxlength' => true]) ?>


    <?= $form->field($model, 'room_no')->textInput(['maxlength' => true]) ?>



I just commented out the


<?= $form->field($model, 'room_loc')->textInput(['maxlength' => true]) ?>

Because I realised I didn’t need it anymore, my problem is that when I tried creating it it doesn’t save. The page just refresh then goes back to the _form.php page

My guess is there’s e.g. a required rule still there so validation fails.

Oh I get it now, I forgot to change the rules in the Model.