这是我的输入脚本,它被阻止我无法检查它,并且我将属性值设置为Active我得到了错误" id权限必须是整数"
<?php foreach(Permission::find()->all() as $key => $perm){ ?>
<tr class="unread selected">
<td>
<div class="ckbox ckbox-theme">
<?= $form->field($modelUserPermission, 'id_permission')->checkbox(['id' => $perm['id'],'name' => $perm['id'],'label'=>"", 'value' =>"1" ] ); ?>
<label for=<?= $perm['id'] ; ?> ></label>
</div>
</td>
<td>
<div class="media">
<div class="media-body">
<!-- <h4 class="text-primary">John Kribo</h4>-->
<p class="email-summary"><strong><?= $perm['description'] ; ?> </strong> </p>
</div>
</div>
</td>
</tr>
&安培;我的模型规则
public function rules()
{
return [
[['id_user', 'id_permission'], 'required'],
[['id_user', 'id_permission'], 'integer'],
[['date_fin'], 'safe'],
[['id_permission'], 'exist', 'skipOnError' => true, 'targetClass' => Permission::className(), 'targetAttribute' => ['id_permission' => 'id']],
[['id_user'], 'exist', 'skipOnError' => true, 'targetClass' => User::className(), 'targetAttribute' => ['id_user' => 'id']],
];
}