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
@@ -50,7 +50,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