import mx.events.ValidationResultEvent;
private var vResult:ValidationResultEvent;
private function phoneFormat():void {
vResult = phoneValidator.validate();
if (vResult.type==ValidationResultEvent.VALID) {
inputPhone.text = phoneFormatter.format(inputPhone.text);
} else {
inputPhone.text= "";
}
}