Data Model Flex



        
        
    
        
            import mx.events.ValidationResultEvent;
            private var vResult:ValidationResultEvent;
            private function dateFormat():void
            {
                vResult = dateVal.validate(inputDate.text);
                if (vResult.type==ValidationResultEvent.VALID) {
                    inputDate.text = dateFormatter.format(inputDate.text);
                } else {
                    inputDate.text= "";
                }
            }