@@ -47,6 +47,7 @@ <h4 class="mat-h4 flex-98">
4747 matInput
4848 required
4949 formControlName ="repaymentEvery "
50+ min ="0 "
5051 matTooltip ="{{ 'tooltips.Fields are input to calculating the repayment schedule' | translate }} "
5152 />
5253 @if (loansAccountTermsForm.controls.repaymentEvery.hasError('required')) {
@@ -55,6 +56,9 @@ <h4 class="mat-h4 flex-98">
5556 < strong > {{ 'labels.commons.required' | translate }}</ strong >
5657 </ mat-error >
5758 }
59+ @if (loansAccountTermsForm.controls.repaymentEvery.hasError('min')) {
60+ < mat-error > {{ 'labels.inputs.Repaid every' | translate }} must be at least < strong > 0</ strong > </ mat-error >
61+ }
5862 </ mat-form-field >
5963
6064 < mat-form-field class ="flex-23 ">
@@ -72,13 +76,16 @@ <h4 class="mat-h4 flex-98">
7276 @if (loanProductService.isLoanProduct) {
7377 < mat-form-field class ="flex-fill flex-23 ">
7478 < mat-label > {{ 'labels.inputs.Loan Term' | translate }}</ mat-label >
75- < input type ="number " matInput required formControlName ="loanTermFrequency " />
79+ < input type ="number " matInput required formControlName ="loanTermFrequency " min =" 0 " />
7680 @if (loansAccountTermsForm.controls.loanTermFrequency.hasError('required')) {
7781 < mat-error >
7882 {{ 'labels.inputs.Loan Term' | translate }} {{ 'labels.commons.is' | translate }}
7983 < strong > {{ 'labels.commons.required' | translate }}</ strong >
8084 </ mat-error >
8185 }
86+ @if (loansAccountTermsForm.controls.loanTermFrequency.hasError('min')) {
87+ < mat-error > {{ 'labels.inputs.Loan Term' | translate }} must be at least < strong > 0</ strong > </ mat-error >
88+ }
8289 </ mat-form-field >
8390
8491 < mat-form-field class ="flex-fill flex-23 ">
@@ -118,6 +125,7 @@ <h4 class="mat-h4 flex-98">{{ 'labels.inputs.Repayments' | translate }}</h4>
118125 type ="number "
119126 matInput
120127 formControlName ="numberOfRepayments "
128+ min ="0 "
121129 matTooltip ="{{ 'tooltips.Enter the total count of repayments' | translate }} "
122130 />
123131 @if (loansAccountTermsForm.controls.numberOfRepayments.hasError('required')) {
@@ -126,6 +134,11 @@ <h4 class="mat-h4 flex-98">{{ 'labels.inputs.Repayments' | translate }}</h4>
126134 < strong > {{ 'labels.commons.required' | translate }}</ strong >
127135 </ mat-error >
128136 }
137+ @if (loansAccountTermsForm.controls.numberOfRepayments.hasError('min')) {
138+ < mat-error >
139+ {{ 'labels.inputs.Number of repayments' | translate }} must be at least < strong > 0</ strong >
140+ </ mat-error >
141+ }
129142 </ mat-form-field >
130143
131144 @if (loansAccountTermsData?.canDefineInstallmentAmount) {
@@ -178,6 +191,7 @@ <h4 class="mat-h4 flex-98">
178191 matInput
179192 required
180193 formControlName ="repaymentEvery "
194+ min ="0 "
181195 matTooltip ="{{ 'tooltips.Fields are input to calculating the repayment schedule' | translate }} "
182196 />
183197 @if (loansAccountTermsForm.controls.repaymentEvery.hasError('required')) {
@@ -186,6 +200,9 @@ <h4 class="mat-h4 flex-98">
186200 < strong > {{ 'labels.commons.required' | translate }}</ strong >
187201 </ mat-error >
188202 }
203+ @if (loansAccountTermsForm.controls.repaymentEvery.hasError('min')) {
204+ < mat-error > {{ 'labels.inputs.Repaid every' | translate }} must be at least < strong > 0</ strong > </ mat-error >
205+ }
189206 </ mat-form-field >
190207
191208 < mat-form-field class ="flex-fill flex-23 ">
@@ -247,7 +264,12 @@ <h4 class="mat-h4 flex-98">{{ 'labels.inputs.Nominal interest rate' | translate
247264 @if (!loansAccountTermsData?.isLoanProductLinkedToFloatingRate) {
248265 < mat-form-field class ="flex-fill flex-23 ">
249266 < mat-label > {{ 'labels.inputs.Nominal interest rate' | translate }} %</ mat-label >
250- < input type ="number " matInput formControlName ="interestRatePerPeriod " />
267+ < input type ="number " matInput formControlName ="interestRatePerPeriod " min ="0.01 " step ="0.01 " />
268+ @if (loansAccountTermsForm.controls.interestRatePerPeriod.hasError('min')) {
269+ < mat-error >
270+ {{ 'labels.inputs.Nominal interest rate' | translate }} must be at least < strong > 0.01</ strong >
271+ </ mat-error >
272+ }
251273 </ mat-form-field >
252274 < mat-form-field class ="flex-fill flex-23 ">
253275 < mat-label > {{ 'labels.inputs.Frequency' | translate }}</ mat-label >
@@ -428,17 +450,30 @@ <h4 class="mat-h4 flex-98">{{ 'labels.heading.Interest Calculations' | translate
428450 matInput
429451 type ="number "
430452 formControlName ="inArrearsTolerance "
453+ min ="0 "
431454 matTooltip ="{{ 'tooltips.With Arrears tolerance' | translate }} "
432455 />
456+ @if (loansAccountTermsForm.controls.inArrearsTolerance.hasError('min')) {
457+ < mat-error >
458+ {{ 'labels.inputs.Arrears tolerance' | translate }} must be at least < strong > 0</ strong >
459+ </ mat-error >
460+ }
433461 </ mat-form-field >
434462
435463 < mat-form-field class ="flex-48 ">
436464 < mat-label > {{ 'labels.inputs.Interest free period' | translate }}</ mat-label >
437465 < input
438466 matInput
467+ type ="number "
439468 formControlName ="graceOnInterestCharged "
469+ min ="0 "
440470 matTooltip ="{{ 'tooltips.If the Interest Free Period' | translate }} "
441471 />
472+ @if (loansAccountTermsForm.controls.graceOnInterestCharged.hasError('min')) {
473+ < mat-error >
474+ {{ 'labels.inputs.Interest free period' | translate }} must be at least < strong > 0</ strong >
475+ </ mat-error >
476+ }
442477 </ mat-form-field >
443478
444479 < h4 class ="mat-h4 flex-98 ">
@@ -448,17 +483,32 @@ <h4 class="mat-h4 flex-98">
448483
449484 < mat-form-field class ="flex-fill flex-23 ">
450485 < mat-label > {{ 'labels.inputs.Grace on principal payment' | translate }}</ mat-label >
451- < input type ="number " matInput formControlName ="graceOnPrincipalPayment " />
486+ < input type ="number " matInput formControlName ="graceOnPrincipalPayment " min ="0 " />
487+ @if (loansAccountTermsForm.controls.graceOnPrincipalPayment.hasError('min')) {
488+ < mat-error >
489+ {{ 'labels.inputs.Grace on principal payment' | translate }} must be at least < strong > 0</ strong >
490+ </ mat-error >
491+ }
452492 </ mat-form-field >
453493
454494 < mat-form-field class ="flex-fill flex-23 ">
455495 < mat-label > {{ 'labels.inputs.Grace on interest payment' | translate }}</ mat-label >
456- < input type ="number " matInput formControlName ="graceOnInterestPayment " />
496+ < input type ="number " matInput formControlName ="graceOnInterestPayment " min ="0 " />
497+ @if (loansAccountTermsForm.controls.graceOnInterestPayment.hasError('min')) {
498+ < mat-error >
499+ {{ 'labels.inputs.Grace on interest payment' | translate }} must be at least < strong > 0</ strong >
500+ </ mat-error >
501+ }
457502 </ mat-form-field >
458503
459504 < mat-form-field class ="flex-48 ">
460505 < mat-label > {{ 'labels.inputs.On arrears ageing' | translate }}</ mat-label >
461- < input type ="number " matInput formControlName ="graceOnArrearsAgeing " />
506+ < input type ="number " matInput formControlName ="graceOnArrearsAgeing " min ="0 " />
507+ @if (loansAccountTermsForm.controls.graceOnArrearsAgeing.hasError('min')) {
508+ < mat-error >
509+ {{ 'labels.inputs.On arrears ageing' | translate }} must be at least < strong > 0</ strong >
510+ </ mat-error >
511+ }
462512 </ mat-form-field >
463513
464514 @if (isDelinquencyEnabled()) {
0 commit comments