adamsaghy commented on code in PR #5112:
URL: https://github.com/apache/fineract/pull/5112#discussion_r2498813100
##########
fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/DataValidatorBuilder.java:
##########
@@ -1017,23 +1017,22 @@ public DataValidatorBuilder validateDateBefore(final
LocalDate date) {
return this;
}
- public DataValidatorBuilder validateDateAfterOrEqual(final LocalDate date)
{
+ public void validateDateAfterOrEqual(final LocalDate date) {
if (this.value == null && this.ignoreNullValue) {
- return this;
+ return;
}
if (this.value != null && date != null) {
final LocalDate dateVal = (LocalDate) this.value;
if (DateUtils.isBefore(dateVal, date)) {
- String validationErrorCode = "validation.msg." + this.resource
+ "." + this.parameter + ".is.before.than.date";
- String defaultEnglishMessage = "The parameter `" +
this.parameter + "` must be greater than or equal to the provided date: "
- + date;
+ final String validationErrorCode = "validation.msg." +
this.resource + "." + this.parameter + ".is.before.than.date";
+ final String defaultEnglishMessage = "The parameter `" +
this.parameter
+ + "` must be greater than or equal to the provided
date: " + date;
final ApiParameterError error =
ApiParameterError.parameterError(validationErrorCode, defaultEnglishMessage,
this.parameter,
dateVal, date);
this.dataValidationErrors.add(error);
}
}
- return this;
Review Comment:
why to change this?
--
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]