I had a need to save a bunch of 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:



The submit button will stay inactive till all 3 email address's are valid. Hovering over an invalid email address field will tell you why it's invalid.

This avoids the need to validate the email address server side before emailing and saving.

Code is available here: View Source

1 comments:

John Gag said...

Flex makes this so easy to do. Nice little example

Post a Comment