views:

35

answers:

3

Hi, Is it possible to parse the enetered text in the textinput,i want to find the entered text contain's @ symbol and . symbol without using email validator..is it possible? Thank's in advance....

A: 

Sure. However, you will need to add an event handler so that you get notified when the user has completed entering text. Once your event handler is invoked, you can extract the .text field and parse it.

dirkgently
+1  A: 

This is not exactly the answer you are looking for, however it sounds like you might be validating that the user enters a valid email address. Flex has pretty useful validators ready to go and you can create your own.

It ships with an EmailValidator which can be used by adding to your mxml

<!-- Validate email -->
<mx:EmailValidator
    id="emailValidator"
    source="{emailInput}" property="text"
/>
Jeduan Cornejo
A: 

Infact its possible without adding an event Handler to the TextInput box. For instance you have an Text Input:

<s:TextInput id="input1" x="75" y="385"/>

And now in order to parse this user input according to some regular expression , just use the .text property of the input box in the appropriate event handler . For ex "A Submit Button" s event handler.

bakore