WEB-466 Number of Repayments Field Allows Zero and Negative Values in Loan Product Creation Form (#2889)
This commit is contained in:
+5
-5
@@ -96,13 +96,13 @@
|
|||||||
<input type="number" matInput formControlName="minNumberOfRepayments" [min]="1" />
|
<input type="number" matInput formControlName="minNumberOfRepayments" [min]="1" />
|
||||||
<mat-error>
|
<mat-error>
|
||||||
{{ 'labels.commons.Minimum Value must be' | translate }}
|
{{ 'labels.commons.Minimum Value must be' | translate }}
|
||||||
<strong>{{ 'labels.commons.greater equal to than 0' | translate }}</strong>
|
<strong>1</strong>
|
||||||
</mat-error>
|
</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field class="flex-31">
|
<mat-form-field class="flex-31">
|
||||||
<mat-label>{{ 'labels.inputs.Default' | translate }}</mat-label>
|
<mat-label>{{ 'labels.inputs.Default' | translate }}</mat-label>
|
||||||
<input type="number" matInput formControlName="numberOfRepayments" required />
|
<input type="number" matInput formControlName="numberOfRepayments" required [min]="1" />
|
||||||
<mat-error>
|
<mat-error>
|
||||||
{{ 'labels.catalogs.Default' | translate }} {{ 'labels.inputs.Number of repayments' | translate }}
|
{{ 'labels.catalogs.Default' | translate }} {{ 'labels.inputs.Number of repayments' | translate }}
|
||||||
{{ 'labels.commons.is' | translate }}
|
{{ 'labels.commons.is' | translate }}
|
||||||
@@ -112,12 +112,12 @@
|
|||||||
|
|
||||||
<mat-form-field class="flex-31">
|
<mat-form-field class="flex-31">
|
||||||
<mat-label>{{ 'labels.inputs.Maximum' | translate }}</mat-label>
|
<mat-label>{{ 'labels.inputs.Maximum' | translate }}</mat-label>
|
||||||
<input type="number" matInput formControlName="maxNumberOfRepayments" [min]="0" />
|
<input type="number" matInput formControlName="maxNumberOfRepayments" [min]="1" />
|
||||||
<mat-error>
|
<mat-error>
|
||||||
{{ 'labels.commons.Maximum Value must be' | translate }}
|
{{ 'labels.commons.Maximum Value must be' | translate }}
|
||||||
<strong>{{ 'labels.commons.greater equal to than 0' | translate }}</strong>
|
<strong>1</strong>
|
||||||
{{ 'labels.commons.and must be greater than' | translate }}
|
{{ 'labels.commons.and must be greater than' | translate }}
|
||||||
<strong>{{ 'labels.commons.Minimum Principal' | translate }}</strong>
|
<strong>{{ 'labels.inputs.Minimum' | translate }}</strong>
|
||||||
</mat-error>
|
</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
|
|||||||
+16
-3
@@ -194,12 +194,25 @@ export class LoanProductTermsStepComponent implements OnInit, OnChanges {
|
|||||||
Validators.required
|
Validators.required
|
||||||
],
|
],
|
||||||
maxPrincipal: [''],
|
maxPrincipal: [''],
|
||||||
minNumberOfRepayments: [''],
|
minNumberOfRepayments: [
|
||||||
|
'',
|
||||||
|
[
|
||||||
|
Validators.pattern('^[1-9]\\d*$')
|
||||||
|
]
|
||||||
|
],
|
||||||
numberOfRepayments: [
|
numberOfRepayments: [
|
||||||
'',
|
'',
|
||||||
Validators.required
|
[
|
||||||
|
Validators.required,
|
||||||
|
Validators.pattern('^[1-9]\\d*$')
|
||||||
|
]
|
||||||
|
],
|
||||||
|
maxNumberOfRepayments: [
|
||||||
|
'',
|
||||||
|
[
|
||||||
|
Validators.pattern('^[1-9]\\d*$')
|
||||||
|
]
|
||||||
],
|
],
|
||||||
maxNumberOfRepayments: [''],
|
|
||||||
isLinkedToFloatingInterestRates: [false],
|
isLinkedToFloatingInterestRates: [false],
|
||||||
allowApprovedDisbursedAmountsOverApplied: [false],
|
allowApprovedDisbursedAmountsOverApplied: [false],
|
||||||
overAppliedCalculationType: [{ value: null, disabled: true }],
|
overAppliedCalculationType: [{ value: null, disabled: true }],
|
||||||
|
|||||||
Reference in New Issue
Block a user