Yii2 sets array shape field as required in model
If I have the following form field (code below), how can I set the field as required in my model so that like other fields, the form cannot be submitted without it containing information.
<?= $form->field($model, 'seo[seo_title]')->textInput(['maxlength' => 60])->label('SEO Title') ?>
+3
source to share