Resolved conflicts of PR GEPAFINBE-6139 (Reviewed Evaluation Process)
This commit is contained in:
@@ -1095,6 +1095,22 @@ public class Utils {
|
||||
return "Invalid amount format";
|
||||
}
|
||||
}
|
||||
public static void validateEmailJson(Map<String, Object> emailJson) {
|
||||
for (Map.Entry<String, Object> entry : emailJson.entrySet()) {
|
||||
if (isEmpty(entry.getKey())) {
|
||||
throw new CustomValidationException(Status.VALIDATION_ERROR, Translator.toLocale(GepafinConstant.INVALID_EMAIL_JSON));
|
||||
}
|
||||
}
|
||||
validateJsonKeys(emailJson, GepafinConstant.MANUAL_EMAIL_KEYS);
|
||||
|
||||
}
|
||||
private static void validateJsonKeys(Map<String, Object> actionJson, List<String> validkeys) {
|
||||
for (String key : validkeys) {
|
||||
if (!actionJson.containsKey(key)) {
|
||||
throw new CustomValidationException(Status.VALIDATION_ERROR, Translator.toLocale(GepafinConstant.INVALID_EMAIL_JSON));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user