Commit 90917360 authored by Omkar Ingale's avatar Omkar Ingale

Added validation for wrong name and In-memory sql string in mailingListIC.java

parent 0a820654
...@@ -277,7 +277,7 @@ public class MailingListIC extends ValidatorEJB { ...@@ -277,7 +277,7 @@ public class MailingListIC extends ValidatorEJB {
String mailListType = checkNull(genericUtility.getColumnValue("mail_list_type", dom)); String mailListType = checkNull(genericUtility.getColumnValue("mail_list_type", dom));
BaseLogger.log("3", null, null, "[below mailListType value : (" + mailListType + ") ]"); BaseLogger.log("3", null, null, "[below mailListType value : (" + mailListType + ") ]");
BaseLogger.log("3", null, null, "[New updated from pc : (" + mailListType + ") ]"); BaseLogger.log("3", null, null, "[New updated from pc : (" + mailListType + ") ]");
if ("S".equalsIgnoreCase(mailListType)) { if ("S".equalsIgnoreCase(mailListType) || "I".equalsIgnoreCase(mailListType)) {
if (childNodeName.equalsIgnoreCase("sql_str")) { if (childNodeName.equalsIgnoreCase("sql_str")) {
if (childNode.getFirstChild() == null) { if (childNode.getFirstChild() == null) {
errorString = getErrorString("sql_str", "VTBISINTSQ", userId); errorString = getErrorString("sql_str", "VTBISINTSQ", userId);
...@@ -310,6 +310,10 @@ public class MailingListIC extends ValidatorEJB { ...@@ -310,6 +310,10 @@ public class MailingListIC extends ValidatorEJB {
errorString = getErrorString("name", "SQLIM", userId); errorString = getErrorString("name", "SQLIM", userId);
break; break;
} }
if (!Name.matches("^[a-zA-Z]+$")) {
errorString = getErrorString("name", "INVNAME", userId);
break;
}
} }
if (childNodeName.equalsIgnoreCase("email_id")) { if (childNodeName.equalsIgnoreCase("email_id")) {
if (childNode.getFirstChild() == null || email_id.length() > 0) { if (childNode.getFirstChild() == null || email_id.length() > 0) {
...@@ -331,6 +335,10 @@ public class MailingListIC extends ValidatorEJB { ...@@ -331,6 +335,10 @@ public class MailingListIC extends ValidatorEJB {
errorString = getErrorString("name", "ALLFIELD", userId); errorString = getErrorString("name", "ALLFIELD", userId);
break; break;
} }
if (!Name.matches("^[a-zA-Z]+$")) {
errorString = getErrorString("name", "INVNAME", userId);
break;
}
} }
if (childNodeName.equalsIgnoreCase("email_id")) { if (childNodeName.equalsIgnoreCase("email_id")) {
if (childNode.getFirstChild() == null) { 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