Pls see this application.Hope it will help u...

http://ryanswanson.com/regexp/#start


On Mar 9, 2:13 am, Jagadish M <[email protected]> wrote:
> <?xml version="1.0" encoding="utf-8"?>
>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="vertical">
>
> <mx:Script>
>
> <![CDATA[
>
> *import* mx.controls.Alert;
>
> *private* *function* disp():*void
> *
>
> {
>
> Alert.show(*'Validation Succeeded!'*)
>
> }
>
> *// Import necessary classes.
> *
>
> *import* mx.controls.Alert;
>
> *import* mx.events.ValidationResultEvent;
>
> *// Event listener for the valid and invalid events.
> *
>
> *private* *function* handleValid(eventObj:ValidationResultEvent):*void*
>
> {
>
> *if*(eventObj.type==ValidationResultEvent.VALID)
>
> *// Enable Submit button.
> *
>
> regn.enabled = *true*;
>
> *else
> *
>
> regn.enabled = *false*;
>
> }
>
> *private* *function* submitForm():*void*
>
> {
>
> Alert.show(*"Form Submitted!"*);
>
> }
>
> ]]>
>
> </mx:Script>
>
> <mx:Model id="CheckModel">
>
> <dateInfo>
>
> <DOB>{dob.text}</DOB>
>
> </dateInfo>
>
> </mx:Model>
>
> <mx:Panel id="RegPnl" width="400" height="400" layout="vertical"
>
> horizontalAlign="center" visible="true" styleName="Panel" backgroundAlpha="0"
> includeInLayout="true">
>
> <mx:Form>
>
> <mx:FormHeading label="Registration Form" />
>
> <mx:FormItem label=" First Name:">
>
> <mx:TextInput id="fname" />
>
> </mx:FormItem>
>
> <mx:FormItem label=" Last Name:">
>
> <mx:TextInput id="lname" />
>
> </mx:FormItem>
>
> <mx:FormItem label=" Phone :">
>
> <mx:TextInput id="phone" />
>
> </mx:FormItem>
>
> <mx:FormItem label=" E-Mail :">
>
> <mx:TextInput id="email" />
>
> </mx:FormItem>
>
> <mx:FormItem label=" Date :">
>
> <mx:TextInput id="dob" />
>
> </mx:FormItem>
>
> <mx:FormItem label="city" >
>
> <mx:ComboBox >
>
> <mx:dataProvider >
>
> <mx:Array >
>
> <mx:String>Hyderabad</mx:String>
>
> <mx:String>secunderabad</mx:String>
>
> <mx:String>Banglore</mx:String>
>
> <mx:String>Mumbai</mx:String>
>
> </mx:Array>
>
> </mx:dataProvider>
>
> </mx:ComboBox>
>
> </mx:FormItem>
>
> <mx:FormItem label="Gender:" direction="horizontal">
>
> <mx:RadioButton label="Male" groupName="gen" selected="true" />
>
> <mx:RadioButton label="Female" groupName="gen" />
>
> </mx:FormItem>
>
> <mx:FormItem label="Marital Status:" direction="horizontal">
>
> <mx:RadioButton label="UnMarried" groupName="mar"/>
>
> <mx:RadioButton label="Married" groupName="mar"/>
>
> </mx:FormItem>
>
> <mx:FormItem label="Fav Music:" direction="horizontal">
>
> <mx:CheckBox label="POP"/>
>
> <mx:CheckBox label="Rock"/>
>
> </mx:FormItem>
>
> </mx:Form>
>
> <mx:Button id="regn" label="Submit" click="submitForm();"/>
>
> </mx:Panel>
>
> <mx:StringValidator id="st" minLength="4" maxLength="15" required="true"
> source="{fname}"
>
> property="text" trigger="{fname}" triggerEvent="focusOut" tooShortError="This
> string is lessthan 4 "
>
> tooLongError="This string is greaterthan 20" valid="handleValid(event)"
> invalid="handleValid(event)"/>
>
> <mx:EmailValidator id="ev" source="{email}" property="text" trigger="{email}"
> triggerEvent="focusOut"
>
> requiredFieldError="Invalid Id"/>
>
> <mx:DateValidator source="{dob}" property="text" allowedFormatChars="/"
>
> trigger="{dob}" triggerEvent="click" valid="Alert.show(*'Validation
> Succeeded!'*);"/>
>
> <mx:PhoneNumberValidator source="{phone}" property="text"
>
> trigger="{phone}" triggerEvent="focusOut" valid="Alert.show(*'Validation
> Succeeded!'*);"/>
>
> <mx:DateFormatter id="df" formatString="DD/MM/YYYY"/>
>
> </mx:Application>
>
>
>
> On Mon, Mar 9, 2009 at 12:34 PM, Flexian_me <[email protected]> wrote:
>
> > var emailExpression:RegExp = /^[a-z][\w....@\w[\w.-]+\.[\w.-]*[a-z][a-
> > z]$/i;
>
> > On Mar 8, 10:09 pm, Krishna Chaitanya <[email protected]> wrote:
> > > hi Folks,
> > >                 I need email Validations using Regular expressions ,
> > > Can any one help me,
>
> > >                                            thanks regards,
>
> > >                                             G. krishna chaitanya
>
> > Thanks & Regards!
>
> > Amar Shukla
>
> --
> Thanks & Regards,
>
> Jagan Mady's
>
> http://flexnflex.wordpress.com/http://snippets.dzone.com/user/mjcprasad2000/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to