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?
 
Mr_NilConnect With a Mentor Commented:
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
All Courses

From novice to tech pro — start learning today.