oleksii-novikov-onix commented on code in PR #5969:
URL: https://github.com/apache/fineract/pull/5969#discussion_r3418806991
##########
fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/validator/WorkingCapitalLoanDelinquencyActionParseAndValidator.java:
##########
@@ -83,6 +101,37 @@ private void validatePause(final
WorkingCapitalLoanDelinquencyAction action, fin
validateNoOverlap(action, existing);
}
+ private void validateResume(final WorkingCapitalLoanDelinquencyAction
action,
+ final List<WorkingCapitalLoanDelinquencyAction> existing) {
+ final LocalDate businessDate = DateUtils.getBusinessLocalDate();
+ validateResumeStartDate(action, businessDate);
+ final WorkingCapitalLoanDelinquencyAction activePause =
findActivePauseForResume(existing, businessDate);
+ validateResumeShortensActivePause(action, activePause);
+ }
+
+ private void validateResumeStartDate(final
WorkingCapitalLoanDelinquencyAction action, final LocalDate businessDate) {
+ if (action.getStartDate() == null) {
+
raiseValidationError("wc-loan-delinquency-action-resume-startDate-cannot-be-blank",
"The parameter `startDate` is mandatory",
Review Comment:
The error format is
wc-loan-delinquency-action-resume-startDate-cannot-be-blank, not
wc.loan.delinquency.action.resume.startDate.cannot.be.blank, when using
DataValidatorBuilder. I think DataValidatorBuilder is the better approach.
--
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]