Solved

cfscript email loop validation

Posted on 2014-04-19
1
259 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 15

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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…
Today, I was working on some optimization and spam-stopping techniques when I encountered Ben Nadel's post to reduce spam feature using Math (http://www.bennadel.com/blog/197-How-I-Stop-Spammers-On-My-ColdFusion-Blog.htm). While this method is not o…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now