galovics commented on code in PR #4042:
URL: https://github.com/apache/fineract/pull/4042#discussion_r1753804263


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanApplicationValidator.java:
##########
@@ -466,6 +469,9 @@ private void validateForCreate(final JsonElement element) {
                     
.extractLocalDateNamed(LoanApiConstants.expectedDisbursementDateParameterName, 
element);
             
baseDataValidator.reset().parameter(LoanApiConstants.expectedDisbursementDateParameterName).value(expectedDisbursementDate)
                     .notNull();
+            if (expectedDisbursementDate == null) {

Review Comment:
   Wait @alberto-art3ch. Are we running business validations before schema 
validations? Shouldn't it be the other way around? 
   
   If we see schema-wise that something is missing, has negative value, etc, 
how can a business validator even run? 



##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanApplicationValidator.java:
##########
@@ -466,6 +469,9 @@ private void validateForCreate(final JsonElement element) {
                     
.extractLocalDateNamed(LoanApiConstants.expectedDisbursementDateParameterName, 
element);
             
baseDataValidator.reset().parameter(LoanApiConstants.expectedDisbursementDateParameterName).value(expectedDisbursementDate)
                     .notNull();
+            if (expectedDisbursementDate == null) {

Review Comment:
   One more thing, can you point me to this "new way" schema validations and 
business validations?



-- 
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