http://stackoverflow.com/questions/20455022/how-to-use-regular-expressions-in-yii
You can try to use match
(CRegularExpressionValidator) rule to validate the attribute value with the specific regular expression like:
public function rules() {
return array(
array('username, password', 'required'),
array(
'username, password',
'match', 'pattern' => '/^[\*a-zA-Z0-9]{6,14}$/',
'message' => 'Invalid characters in username or password.',
),
);
}