?
Solved

cfscript email loop validation

Posted on 2014-04-19
1
Medium Priority
?
278 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

Question has a verified solution.

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

CFGRID Custom Functionality Series -  Part 1 Hi Guys, I was once asked how it is possible to to add a hyperlink in the cfgrid and open the window to show the data. Now this is quite simple, I have to use the EXT JS library for this and I achiev…
Sometimes databases have MILLIONS of records and we need a way to quickly query that table to return the results me need. Sure you could use CFQUERY but it takes too long when there are millions of records. That is why SOLR was invented. Please …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

752 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