Handle Min Max constraint exceptions for crete loan

This commit is contained in:
mifoscontributer
2013-06-12 19:12:22 +05:30
parent b3d7b98f08
commit 7fc4fd12e4
@@ -20,6 +20,7 @@ import org.mifosplatform.infrastructure.core.data.ApiParameterError;
import org.mifosplatform.infrastructure.core.data.CommandProcessingResult;
import org.mifosplatform.infrastructure.core.data.CommandProcessingResultBuilder;
import org.mifosplatform.infrastructure.core.data.DataValidatorBuilder;
import org.mifosplatform.infrastructure.core.exception.PlatformApiDataValidationException;
import org.mifosplatform.infrastructure.core.exception.PlatformDataIntegrityException;
import org.mifosplatform.infrastructure.core.serialization.FromJsonHelper;
import org.mifosplatform.infrastructure.security.service.PlatformSecurityContext;
@@ -152,6 +153,9 @@ public class LoanApplicationWritePlatformServiceJpaRepositoryImpl implements Loa
if (loanProduct == null) { throw new LoanProductNotFoundException(productId); }
this.loanProductCommandFromApiJsonDeserializer.validateMinMaxConstraints(command.parsedJson(), baseDataValidator, loanProduct);
if (!dataValidationErrors.isEmpty()) { throw new PlatformApiDataValidationException("validation.msg.validation.errors.exist",
"Validation errors exist.", dataValidationErrors); }
// validate dates against calendar recurring dates
// get calendar