fynmanoj commented on a change in pull request #2215:
URL: https://github.com/apache/fineract/pull/2215#discussion_r841001293



##########
File path: 
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountDataValidator.java
##########
@@ -415,6 +418,29 @@ private void throwExceptionIfValidationWarningsExist(final 
List<ApiParameterErro
         }
     }
 
+    private void validateLienParams(final DataValidatorBuilder 
baseDataValidator, final JsonElement element) {
+        if (this.fromApiJsonHelper.parameterExists(lienAllowedParamName, 
element)) {
+            final Boolean lienAllowed = 
this.fromApiJsonHelper.extractBooleanNamed(lienAllowedParamName, element);
+            
baseDataValidator.reset().parameter(lienAllowedParamName).value(lienAllowed).ignoreIfNull().validateForBooleanValue();
+        }
+
+        if 
(this.fromApiJsonHelper.parameterExists(maxAllowedLienLimitParamName, element)) 
{

Review comment:
        As per the design, if lienAllowed is true, then max limit is mandatory. 
So instead of parameter exist,  we can check if lienAllowed.




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