Code for Email Domain Validation on CFFORM

Hi,

Can someone please post the code for validation of a domain in a flash CFFORM. I was hoping the CFML for CFFORM would have an option for this but not that I can find. I only want to allow for certain domains so for example only email addresses @mydomain.com.au.

The below is the current code for the cfinput tag I am using. Any help is greatly appreciated.
<cfinput type="text" name="reqEmail" width="300" label="Email:" validate="email" required="yes" message="You must supply your email or the address given is in the wrong format.">

Open in new window

timmo26_80Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mr_NilCommented:
You'll need to write a custom actionscript function to validate your form field on submission of the form.

Flash CFForms are basically mini Flex applications, so using <cfformitem type="script"> you can insert your custom function to validate the field either onchange of the cfinput or onsubmit of the cfform.

I would suggest writing an actionscript function to do a regex match of the field value against a custom expression that meets your specific needs and domains.

http://www.regular-expressions.info/email.html will give you information on regex for email addresses.
http://livedocs.adobe.com/flex/201/langref/RegExp.html should give you some pointers to writing a function to do the regex comparison
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.