Cmaskedtextfield With Varient Format

I’m trying to use the CMaskedTextField to validate a phone number for Brazil. They have different number of digits for some numbers, for example -

(00) 1234-5678 Land lines

(00) 12345-6789 Cell Phones

I was trying to use this code for the phone number but found out about the oddness between land and cell phones.



        'model' =>$model,

        'attribute' => 'int_tel',

        'mask' => '(99) 9999-9999? x9999',


Any ideas or suggestions how to work around the problem using this type of masked edit?