Sunday 29 Jan 2012   
Add Comment

Reusable Email Valdator Component

Flex / ColdFusion Tutorial #15

I had a need to save several email address's to a data base as well and send mail. I wanted to make sure only valid email address's were saved. I wanted this to be as simple and if I can re-use it all the better. Using the EmailValidator in Flex I came up with this example.

Tutorial15.mxml

The submit button will stay inactive till all 3 email address's are valid.

This avoids the need to validate the email address server side before emailing and saving as we know they are valid.



EmailInput.mxml

After every change on the text input the validator is run setting a boolean which I cna bind to in the parent component. Hovering over an invalid email address field will tell you why it's invalid.

We already have a sending email tutorial ( http://tutorial8.flexcf.com/ ) so I didn't repeat the Coldfusion code but with this form we wouldn't have email stuck in Undelivr.



Demo

See this code running!


Download

Download this code as a zip!


Comments

There are no comments!

Click button to add a comment


Author

Paul Kukiel


Published

Thursday 05 Mar 2009

Original

This tutorial has been modified and published with permission of the author. The original tutorial can be found here
http://blog.kukiel.net/2009/03/validating-email-addresss-in-flex.html 

Tags

mx:Application  mx:Button  mx:Canvas  mx:EmailValidator  mx:Form  mx:FormItem  mx:Label  mx:Metadata  mx:Panel  mx:Script  mx:TextInput