The EmailValidator class validates the string, @ sign and a period character(.) in the domain.
The EmailValidator class validates the string, @ sign and a period character(.) in the domain.The EmailValidator class validates the string, @ sign and a period character(.) in the domain. You can use the IP domain name which is enclosed in square bracket. for example abc@[205.130.44.2]. This validator does not check the domain name and the username actually exist or not. The tag of EmailValidator is <mx:Emailvalidator>.
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"> <fx:Script> <![CDATA[ import mx.controls.Alert; ]]> </fx:Script> <fx:Declarations> <fx:Model id="emailCheck"> <emailInfo> <Emailid>{emailtxt.text}</Emailid> </emailInfo> </fx:Model> <mx:EmailValidator source="{emailtxt}" property="text" trigger="{btn}" triggerEvent="click" valid="Alert.show('Validation Succeeded!');"/> </fx:Declarations> <s:Panel title="EmailValidator Example" width="550"> <mx:Form height="94" width="548" backgroundColor="#101446" color="#FFFFFF"> <mx:FormItem label="Enter Email-Id: "> <s:TextInput id="emailtxt" width="100%" color="#000000"/> </mx:FormItem> <mx:FormItem> <s:Button id="btn" label="Check Validation" chromeColor="#5F1B0C"/> </mx:FormItem> </mx:Form> </s:Panel> </s:Application> |
To view this page ensure that Adobe Flash Player version 10.0.0 or greater is installed.