in my Register Form, i want check email already in database:

```
class RegisterForm extends CFormModel
{
        public $firstName;
        public $lastName;
        public $email;

        public function rules()
        {
                return array(
                        array('firstName, lastName, email', 'required'),
                        array('email', 'email'),
                        array('email', 'checkEmail'),
                );
        }

        public function attributeLabels()
        {
                return array();
        }

        public function checkEmail()
        {
                $record = Account::model()->findByAttributes(array('username'=>$this->email));
                if ($record==null) {
                        return true;
                }
                return false;
        }
}

```

but not working, how to create my rules for check email? somebody can help me????