如何在模型yii 1.1中定义arraylist的规则?
我在模型中将变量定义为数组,并将该数组的规则定义为:如何在模型yii 1.1中定义arraylist的规则?,yii,rule,Yii,Rule,我在模型中将变量定义为数组,并将该数组的规则定义为: public $nameList; public function rules() { array('nameList','type'=>'array','allowEmpty'=>false), } 我尝试过这个。我遇到问题了吗?试试这个,它会起作用的 public function rules() { array('nameList','type','type'=>'array','allowEmpty'=>
public $nameList;
public function rules()
{
array('nameList','type'=>'array','allowEmpty'=>false),
}
我尝试过这个。我遇到问题了吗?试试这个,它会起作用的
public function rules()
{
array('nameList','type','type'=>'array','allowEmpty'=>false)
}