Merge pull request #2859 from JaySoni1/WEB-454-nominal-annual-interest-field-allows-zero-and-negative-values-in-saving-product-creation-form
WEB-454 Nominal annual interest field allows zero and negative values in saving product creation form
This commit is contained in:
+6
-1
@@ -8,11 +8,16 @@
|
|||||||
matTooltip="{{ 'tooltips.The default interest rate set' | translate }}"
|
matTooltip="{{ 'tooltips.The default interest rate set' | translate }}"
|
||||||
formControlName="nominalAnnualInterestRate"
|
formControlName="nominalAnnualInterestRate"
|
||||||
required
|
required
|
||||||
|
min="0"
|
||||||
|
step="0.01"
|
||||||
/>
|
/>
|
||||||
<mat-error>
|
<mat-error *ngIf="savingProductTermsForm.get('nominalAnnualInterestRate').hasError('required')">
|
||||||
{{ 'labels.inputs.Nominal Annual Interest' | translate }} {{ 'labels.commons.is' | translate }}
|
{{ 'labels.inputs.Nominal Annual Interest' | translate }} {{ 'labels.commons.is' | translate }}
|
||||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||||
</mat-error>
|
</mat-error>
|
||||||
|
<mat-error *ngIf="savingProductTermsForm.get('nominalAnnualInterestRate').hasError('min')">
|
||||||
|
{{ 'labels.inputs.Nominal Annual Interest' | translate }} must be zero or greater
|
||||||
|
</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<span class="flex-48 hide-lt-md"></span>
|
<span class="flex-48 hide-lt-md"></span>
|
||||||
|
|||||||
+3
-1
@@ -52,7 +52,9 @@ export class SavingProductTermsStepComponent implements OnInit {
|
|||||||
this.savingProductTermsForm = this.formBuilder.group({
|
this.savingProductTermsForm = this.formBuilder.group({
|
||||||
nominalAnnualInterestRate: [
|
nominalAnnualInterestRate: [
|
||||||
'',
|
'',
|
||||||
Validators.required
|
[
|
||||||
|
Validators.required,
|
||||||
|
Validators.min(0)]
|
||||||
],
|
],
|
||||||
interestCompoundingPeriodType: [
|
interestCompoundingPeriodType: [
|
||||||
'',
|
'',
|
||||||
|
|||||||
Reference in New Issue
Block a user