Solved

cfscript email loop validation

Posted on 2014-04-19
1
266 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 200 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

PROBLEM: How to add your own buttons to the bottom toolbar with paging info ( result count ). While creating a cfgrid, I ran into an issue where I wanted to embed my own custom buttons where the default ones ( insert / delete / etc… ) are for aes…
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 …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

730 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