CFormModel ignores unruled fields

In my FormModel, there are some fields that dont need to be verified.

But when there is no verification rule, fields are just returning blank

my FormModel looks like

class CompanyForm extends CFormModel

{

public $name;


public $street;


public $number;





public function rules()


{


	return array(


		array('name', 'required'),


		array('street, number', 'length', 'min'=>1),

// array(‘number’, ‘length’, ‘min’=>1),

	);


}





public function attributeLabels()


{


	return array(


		'name'=>'Naziv firme',


		'street'=>'Ulica',


		'number'=>'Broj',


	);


}

}

when I comment “array(‘street, number’, ‘length’, ‘min’=>1)” row

street and number are returning blank.

this row is some kind of solution because its not checked when fields are empty because they are not required

but I don’t like this solutions.

I also tried in examples and same thing happens.

Yeah you need to use the ‘safe’ rule if there are no other rules specified.