diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/serialization/ChargeDefinitionCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/serialization/ChargeDefinitionCommandFromApiJsonDeserializer.java index e7012df8840..31db2da3aa8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/serialization/ChargeDefinitionCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/serialization/ChargeDefinitionCommandFromApiJsonDeserializer.java @@ -508,7 +508,7 @@ private void validateChargeInsuranceDetails(ChargeCalculationType calculationTyp if (!penalty) { if (calculationType.isVoluntaryInsurance()) { final String insuranceName = this.fromApiJsonHelper.extractStringNamed(ChargesApiConstants.insuranceNameParamName, element); - baseDataValidator.reset().parameter(ChargesApiConstants.insuranceNameParamName).value(insuranceName).notBlank() + baseDataValidator.reset().parameter(ChargesApiConstants.insuranceNameParamName).value(insuranceName) .notExceedingLengthOf(100); final Long insuranceChargedAs = this.fromApiJsonHelper.extractLongNamed(ChargesApiConstants.insuranceChargedAsParamName, @@ -541,28 +541,26 @@ private void validateChargeInsuranceDetails(ChargeCalculationType calculationTyp final Integer daysInArrears = this.fromApiJsonHelper.extractIntegerWithLocaleNamed(ChargesApiConstants.DAYS_IN_ARREARS, element.getAsJsonObject()); - baseDataValidator.reset().parameter(ChargesApiConstants.DAYS_IN_ARREARS).value(daysInArrears).notNull() + baseDataValidator.reset().parameter(ChargesApiConstants.DAYS_IN_ARREARS).value(daysInArrears) .integerEqualToOrGreaterThanNumber(1); } if (calculationType.isInsurance()) { final String insuranceCompany = this.fromApiJsonHelper.extractStringNamed(ChargesApiConstants.insuranceCompanyParamName, element); - baseDataValidator.reset().parameter(ChargesApiConstants.insuranceCompanyParamName).value(insuranceCompany).notBlank() + baseDataValidator.reset().parameter(ChargesApiConstants.insuranceCompanyParamName).value(insuranceCompany) .notExceedingLengthOf(100); final String insurerName = this.fromApiJsonHelper.extractStringNamed(ChargesApiConstants.insurerNameParamName, element); - baseDataValidator.reset().parameter(ChargesApiConstants.insurerNameParamName).value(insurerName).notBlank() - .notExceedingLengthOf(100); + baseDataValidator.reset().parameter(ChargesApiConstants.insurerNameParamName).value(insurerName).notExceedingLengthOf(100); final Long insuranceCode = this.fromApiJsonHelper.extractLongNamed(ChargesApiConstants.insuranceCodeParamName, element.getAsJsonObject()); - baseDataValidator.reset().parameter(ChargesApiConstants.insuranceCodeParamName).value(insuranceCode).notNull() - .longGreaterThanZero(); + baseDataValidator.reset().parameter(ChargesApiConstants.insuranceCodeParamName).value(insuranceCode).longGreaterThanZero(); final Integer daysInArrears = this.fromApiJsonHelper.extractIntegerWithLocaleNamed(ChargesApiConstants.DAYS_IN_ARREARS, element.getAsJsonObject()); - baseDataValidator.reset().parameter(ChargesApiConstants.DAYS_IN_ARREARS).value(daysInArrears).notNull() + baseDataValidator.reset().parameter(ChargesApiConstants.DAYS_IN_ARREARS).value(daysInArrears) .integerEqualToOrGreaterThanNumber(1); }