From dc1f75bbb8a874a04bd978e08da182f63db19c4c Mon Sep 17 00:00:00 2001 From: Soni Jay Date: Sun, 11 Jan 2026 21:07:49 +0530 Subject: [PATCH] WEB-566 Validation Missing: Negative Values Accepted in Currency in multiples of ,Installment in multiples of and Decimal Places Fields (#2981) --- .../loan-product-currency-step.component.html | 27 +++++++++++++++++-- .../loan-product-currency-step.component.ts | 25 +++++++++++++---- 2 files changed, 45 insertions(+), 7 deletions(-) diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-currency-step/loan-product-currency-step.component.html b/src/app/products/loan-products/loan-product-stepper/loan-product-currency-step/loan-product-currency-step.component.html index d6a9ea371..8bb90bd04 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-currency-step/loan-product-currency-step.component.html +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-currency-step/loan-product-currency-step.component.html @@ -31,30 +31,53 @@ {{ 'labels.inputs.Decimal Places' | translate }} - + {{ 'labels.inputs.Decimal Places' | translate }} {{ 'labels.commons.is' | translate }} {{ 'labels.commons.required' | translate }} + + {{ 'labels.inputs.Decimal Places' | translate }} {{ 'labels.commons.Minimum Value must be' | translate }} + 0 + {{ 'labels.inputs.Currency in multiples of' | translate }} + + {{ 'labels.inputs.Currency in multiples of' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + {{ 'labels.inputs.Currency in multiples of' | translate }} + {{ 'labels.commons.Minimum Value must be' | translate }} 1 + {{ 'labels.inputs.Installment in multiples of' | translate }} - + + + {{ 'labels.inputs.Installment in multiples of' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + {{ 'labels.inputs.Installment in multiples of' | translate }} + {{ 'labels.commons.Minimum Value must be' | translate }} 1 + diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-currency-step/loan-product-currency-step.component.ts b/src/app/products/loan-products/loan-product-stepper/loan-product-currency-step/loan-product-currency-step.component.ts index 0702df9fc..487fd4209 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-currency-step/loan-product-currency-step.component.ts +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-currency-step/loan-product-currency-step.component.ts @@ -45,8 +45,8 @@ export class LoanProductCurrencyStepComponent implements OnInit { digitsAfterDecimal: this.loanProductsTemplate.currency.decimalPlaces ? this.loanProductsTemplate.currency.decimalPlaces : 2, - inMultiplesOf: this.loanProductsTemplate.currency.inMultiplesOf, - installmentAmountInMultiplesOf: this.loanProductsTemplate.installmentAmountInMultiplesOf + inMultiplesOf: this.loanProductsTemplate.currency.inMultiplesOf ?? 1, + installmentAmountInMultiplesOf: this.loanProductsTemplate.installmentAmountInMultiplesOf ?? 1 }); } @@ -58,10 +58,25 @@ export class LoanProductCurrencyStepComponent implements OnInit { ], digitsAfterDecimal: [ 2, - Validators.required + [ + Validators.required, + Validators.min(0) + ] ], - inMultiplesOf: '', - installmentAmountInMultiplesOf: '' + inMultiplesOf: [ + 1, + [ + Validators.required, + Validators.min(1) + ] + ], + installmentAmountInMultiplesOf: [ + '', + [ + Validators.required, + Validators.min(1) + ] + ] }); }