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.
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";
};
};
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.