Validating radioButtonList

I am not sure if I have found a bug or I am doing something wrong (yii-1.1.9.r3527).

Model Code


public function rules()

	{

		return array(

			array('sub','compare','compareValue'=>'-1','operator'=>'>','message'=>'select button'),

		);

	}

Will work to make sure at least one radio button is selected. My radio button values are either 0 or 1.

If I do


public function rules()

	{

		return array(

			array('sub','compare','allowEmpty'=>true,'message'=>'select button'),

		);

	}

the form will be submitted without making a selection. Which is what I would expect.

If I do


public function rules()

	{

		return array(

			array('sub','compare','allowEmpty'=>false,'message'=>'select button'),

		);

	}

or


public function rules()

	{

		return array(

			array('sub','compare','message'=>'select button'),

		);

	}

the form will not submit with a selection. Which is not what I would expect.

I am I missing something or is this a bug?