Commit d6e6760c authored by Omkar Ingale's avatar Omkar Ingale

Added email validation for correct email mailingListIC.java

parent cf513cae
......@@ -345,6 +345,15 @@ public class MailingListIC extends ValidatorEJB {
errorString = getErrorString("email_id", "ALLFIELD", userId);
break;
}
String emailId = checkNull(genericUtility.getColumnValue("email_id", dom2));
String emailRegex = "^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@" +
"(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,7}$";
if (!emailId.matches(emailRegex)) {
errorString = getErrorString("email_id", "INVEMAIL", userId); // Error for invalid email
break;
}
}
if (childNodeName.equalsIgnoreCase("line_no")) {
if (childNode.getFirstChild() == null ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment