import mx.events.ValidationResultEvent;
import mx.validators.ZipCodeValidator;
public function performValidation():void {
var v:ZipCodeValidator = new ZipCodeValidator();
var vResult:ValidationResultEvent;
v.domain = "US or Canada";
v.listener=myZip;
vResult = v.validate(myZip.text);
myTA.text= String(vResult.type==ValidationResultEvent.VALID);
}