adamsaghy commented on code in PR #3232:
URL: https://github.com/apache/fineract/pull/3232#discussion_r1219702358


##########
fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/Client.java:
##########
@@ -443,51 +430,32 @@ private void validateNameParts(final 
List<ApiParameterError> dataValidationError
         }
     }
 
-    private void validateActivationDate(final List<ApiParameterError> 
dataValidationErrors) {
+    private void validateActivationDate() {
 
         if (getSubmittedOnDate() != null && 
isDateInTheFuture(getSubmittedOnDate())) {
-
-            final String defaultUserMessage = "submitted date cannot be in the 
future.";
-            final ApiParameterError error = 
ApiParameterError.parameterError("error.msg.clients.submittedOnDate.in.the.future",
-                    defaultUserMessage, 
ClientApiConstants.submittedOnDateParamName, this.submittedOnDate);
-
-            dataValidationErrors.add(error);
+            throw new 
InvalidClientActivationDateException("submittedOnDate.in.the.future", 
"submitted date cannot be in the future.",

Review Comment:
   this might break the contract. Priorly the submitted on date and the 
**problematic field name** was sent, i reckon.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to