Php Yii-无法为表单提交定义安全的属性数组

Php Yii-无法为表单提交定义安全的属性数组,php,yii,Php,Yii,我有一个PHP表单,需要提交一个数字数组,我们看到的是: <input type="text" id="ProductForm_sizeobj_1" name="ProductForm[sizeobj[1]]" value="13"> <input type="text" id="ProductForm_sizeobj_2" name="ProductForm[sizeobj[2]]" value="13"> <input type="text" id="Produ

我有一个PHP表单,需要提交一个数字数组,我们看到的是:

<input type="text" id="ProductForm_sizeobj_1" name="ProductForm[sizeobj[1]]" value="13">
<input type="text" id="ProductForm_sizeobj_2" name="ProductForm[sizeobj[2]]" value="13">
<input type="text" id="ProductForm_sizeobj_3" name="ProductForm[sizeobj[3]]" value="13">
由于“Sizeobj”是一个动态属性,并且大小将增长超过3,因此我使用数组。但是,表单提交后,错误抛出如下:

Failed to set unsafe attribute "sizeobj[1" of "ProductForm".

我相信我可能使用了错误的方法来设置数组属性或错误的规则,有什么建议吗?我是Yii的新手,非常感谢您的帮助

使用
name=“ProductForm[sizeobj][1]”
代替
name=“ProductForm[sizeobj[1]”

谢谢您的参考!
Failed to set unsafe attribute "sizeobj[1" of "ProductForm".