这究竟是什么意思? 这是我的模型规则,还是这个错误与其他东西有关?
array('product_gallery_2, product_gallery_3, product_gallery_4, product_gallery_5, product_gallery_6', 'safe'=>true, 'file', 'allowEmpty' => TRUE,'types'=>'jpg, jpeg, png, gif', 'maxSize' => 600000, 'on'=>'insert,update,create'),
array('product_image,product_gallery_1', 'file', 'safe'=>true,'types'=>'jpg, jpeg, png, gif', 'maxSize' => 600000, 'on'=>'insert,update,create'),
array('product_image,product_gallery_1, product_gallery_2, product_gallery_3, product_gallery_4, product_gallery_5, product_gallery_6', 'length', 'max'=>50,'message'=>'{attribute} name is too long.'),
答案 0 :(得分:0)
编辑:
safe
(CFileValidator
属性,非验证者)应设置为 ' file'在您的规则中输入,例如:
array('product_gallery_2, product_gallery_3, product_gallery_4, product_gallery_5, product_gallery_6', 'file', 'safe'=>true, 'allowEmpty' => TRUE,'types'=>'jpg, jpeg, png, gif', 'maxSize' => 600000, 'on'=>'insert,update,create'),
array('product_image,product_gallery_1', 'file', 'safe'=>true, 'types'=>'jpg, jpeg, png, gif', 'maxSize' => 600000, 'on'=>'insert,update,create'),