diff --git a/src/main/java/org/sunbird/common/util/ProjectUtil.java b/src/main/java/org/sunbird/common/util/ProjectUtil.java index 02a169bca..0602f451b 100644 --- a/src/main/java/org/sunbird/common/util/ProjectUtil.java +++ b/src/main/java/org/sunbird/common/util/ProjectUtil.java @@ -204,7 +204,7 @@ public static Boolean validateEmployeeId(String employeeId) { } public static Boolean validateRegexPatternWithNoSpecialCharacter(String regex) { - return regex.matches("^[a-zA-Z0-9 -()]*$"); + return regex.matches("^[a-zA-Z0-9 \\-()]*$"); } public static Boolean validatePinCode(String regex) { diff --git a/src/main/java/org/sunbird/profile/service/UserBulkUploadService.java b/src/main/java/org/sunbird/profile/service/UserBulkUploadService.java index 59e60c00a..641b99ed8 100644 --- a/src/main/java/org/sunbird/profile/service/UserBulkUploadService.java +++ b/src/main/java/org/sunbird/profile/service/UserBulkUploadService.java @@ -478,6 +478,7 @@ private List validateReceivedKafkaMessage(HashMap inputD } private boolean validateFieldValue(String fieldKey, String fieldValue) { + fieldValue = fieldValue.toLowerCase(); if(redisCacheMgr.keyExists(fieldKey)){ return !redisCacheMgr.valueExists(fieldKey, fieldValue); } else{ @@ -488,7 +489,7 @@ private boolean validateFieldValue(String fieldKey, String fieldValue) { if(!CollectionUtils.isEmpty(fieldValueList)) { String columnName = fieldValueList.get(0).get("contextname") != null ? "contextname" : "contextName"; for(Map languageMap : fieldValueList){ - designationsSet.add((String)languageMap.get(columnName)); + designationsSet.add(((String)languageMap.get(columnName)).toLowerCase()); } } redisCacheMgr.putCacheAsStringArray(fieldKey, designationsSet.toArray(new String[0]), null);