Cmaskedtextfield And Network Ip Or Mask

Hey everybody, just wondering how to do a mask for IP adresses or netmask. For moment I didn’t do better than something like :


 $this->widget('CMaskedTextField',

  array('model'=>$model,

  'attribute'=>'mask',

  'charMap'=>array('2'=>'[0-2]|','5'=>'[0-5]|'),

  'mask'=>'255.255.255.255'));

It works approximately… indeed, this mask constraints user to write for every part of the netmask 3 characters… thus any possibility to write something like 255.255.255.0 but 255.255.255.000 which looks weird and not natural… and I found no other way to do it… any idea ? :)

Or is it possible finally ?