?
Solved

cfscript email loop validation

Posted on 2014-04-19
1
Medium Priority
?
285 Views
Last Modified: 2014-04-24
Hi,

I wanted to know if I could use cfscript by validating multiple email address. Obviously the "i"s with brackets are not correct but when I plugin "1" through how ever many results I have it seems to work fine.

// Check Email
  i = 0;
  l = FORM.numberOfFields;

  for (i = 1; i lte l; i = i + 1) {

  	thisEmail = FORM.p_new_[i];

	if (ListContainsNoCase(thisEmail, "@") EQ "0" OR ListContainsNoCase(thisEmail, ".") EQ "0") {

	   VAR.EMAIL_ERROR_[i] = "YES";
	   VAR.FieldInvalid = "YES";

	};

  };

Open in new window

0
Comment
Question by:brihol44
1 Comment
 
LVL 16

Accepted Solution

by:
Gurpreet Singh Randhawa earned 600 total points
ID: 40010994
This function can help you in cfscript:

http://www.mollerus.net/tom/blog/2007/10/validating_multiple_emails_in_one_field.html

This is anoter way of validating multiple email address but cftag way

http://tutorial500.easycfm.com/
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

PROBLEM:  How to open a cfwindow or run a function on double click of a cfgrid row. One of my clients wanted to be able to double click on a row item to get more detailed information about a transaction and to be able to modify the line items i…
This is an updated version of a post made on my blog over 3 years ago. It is unfortunately, still very relevant as we continue to see both SQLi (SQL injection) and XSS (cross site scripting) attacks hitting some of the most recognizable website and …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question