Link to home
Start Free TrialLog in
Avatar of brihol44
brihol44

asked on

cfscript email loop validation

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

ASKER CERTIFIED SOLUTION
Avatar of Coast Line
Coast Line
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial