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 }}"
|
||||
formControlName="nominalAnnualInterestRate"
|
||||
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 }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</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>
|
||||
|
||||
<span class="flex-48 hide-lt-md"></span>
|
||||
|
||||
+3
-1
@@ -50,7 +50,9 @@ export class SavingProductTermsStepComponent implements OnInit {
|
||||
this.savingProductTermsForm = this.formBuilder.group({
|
||||
nominalAnnualInterestRate: [
|
||||
'',
|
||||
Validators.required
|
||||
[
|
||||
Validators.required,
|
||||
Validators.min(0)]
|
||||
],
|
||||
interestCompoundingPeriodType: [
|
||||
'',
|
||||
|
||||
Reference in New Issue
Block a user