xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx">
// Import event class.
import mx.events.ValidationResultEvent;
// Define variable for storing the validation event object.
private var vResult:ValidationResultEvent;
private function validateZipPhone():void {
// Validate the ZIP code.
vResult = zipV.validate();
// If the ZIP code is invalid,
// do not move on to the next field.
if (vResult.type==ValidationResultEvent.INVALID)
return;
// Validate the phone number.
vResult = pnV.validate();
// If the phone number is invalid,
// do not move on to the validation.
if (vResult.type==ValidationResultEvent.INVALID)
return;
}
{zipCodeInput.text}
{phoneNumberInput.text}
property="text" />
source="{phoneNumberInput}" property="text" />