diff --git a/src/app/products/saving-products/saving-product-stepper/saving-product-settings-step/saving-product-settings-step.component.html b/src/app/products/saving-products/saving-product-stepper/saving-product-settings-step/saving-product-settings-step.component.html
index c5dff475f..969c55083 100644
--- a/src/app/products/saving-products/saving-product-stepper/saving-product-settings-step/saving-product-settings-step.component.html
+++ b/src/app/products/saving-products/saving-product-stepper/saving-product-settings-step/saving-product-settings-step.component.html
@@ -180,6 +180,8 @@
matInput
matTooltip="{{ 'tooltips.Sets the overdraft required for interest calculation' | translate }}"
formControlName="minOverdraftForInterestCalculation"
+ min="0"
+ step="0.01"
/>
@@ -189,6 +191,8 @@
matInput
matTooltip="{{ 'tooltips.Default interest rate on overdraft' | translate }}"
formControlName="nominalAnnualInterestRateOverdraft"
+ min="0"
+ step="0.01"
/>
@@ -198,6 +202,8 @@
matInput
matTooltip="{{ 'tooltips.Sets the maximum allowed overdraft amount' | translate }}"
formControlName="overdraftLimit"
+ min="0"
+ step="0.01"
/>
@@ -225,6 +231,8 @@
matInput
matTooltip="{{ 'tooltips.Inactive period to mark an account as Inactive' | translate }}"
formControlName="daysToInactive"
+ min="0"
+ step="1"
required
/>
@@ -240,6 +248,8 @@
matInput
matTooltip="{{ 'tooltips.Inactive period to mark an account as Dormant' | translate }}"
formControlName="daysToDormancy"
+ min="0"
+ step="1"
required
/>
@@ -254,6 +264,8 @@
matInput
matTooltip="{{ 'tooltips.Inactive period to mark an account as Escheat' | translate }}"
formControlName="daysToEscheat"
+ min="0"
+ step="1"
required
/>
diff --git a/src/app/products/saving-products/saving-product-stepper/saving-product-settings-step/saving-product-settings-step.component.ts b/src/app/products/saving-products/saving-product-stepper/saving-product-settings-step/saving-product-settings-step.component.ts
index 294b579d6..8c48ddb89 100644
--- a/src/app/products/saving-products/saving-product-stepper/saving-product-settings-step/saving-product-settings-step.component.ts
+++ b/src/app/products/saving-products/saving-product-stepper/saving-product-settings-step/saving-product-settings-step.component.ts
@@ -132,9 +132,15 @@ export class SavingProductSettingsStepComponent implements OnInit {
this.savingProductSettingsForm.get('allowOverdraft').valueChanges.subscribe((allowOverdraft: any) => {
if (allowOverdraft) {
- this.savingProductSettingsForm.addControl('minOverdraftForInterestCalculation', new UntypedFormControl(''));
- this.savingProductSettingsForm.addControl('nominalAnnualInterestRateOverdraft', new UntypedFormControl(''));
- this.savingProductSettingsForm.addControl('overdraftLimit', new UntypedFormControl(''));
+ this.savingProductSettingsForm.addControl(
+ 'minOverdraftForInterestCalculation',
+ new UntypedFormControl('', [Validators.min(0)])
+ );
+ this.savingProductSettingsForm.addControl(
+ 'nominalAnnualInterestRateOverdraft',
+ new UntypedFormControl('', [Validators.min(0)])
+ );
+ this.savingProductSettingsForm.addControl('overdraftLimit', new UntypedFormControl('', [Validators.min(0)]));
} else {
this.savingProductSettingsForm.removeControl('minOverdraftForInterestCalculation');
this.savingProductSettingsForm.removeControl('nominalAnnualInterestRateOverdraft');
@@ -154,9 +160,27 @@ export class SavingProductSettingsStepComponent implements OnInit {
.get('isDormancyTrackingActive')
.valueChanges.subscribe((isDormancyTrackingActive: any) => {
if (isDormancyTrackingActive) {
- this.savingProductSettingsForm.addControl('daysToInactive', new UntypedFormControl('', Validators.required));
- this.savingProductSettingsForm.addControl('daysToDormancy', new UntypedFormControl('', Validators.required));
- this.savingProductSettingsForm.addControl('daysToEscheat', new UntypedFormControl('', Validators.required));
+ this.savingProductSettingsForm.addControl(
+ 'daysToInactive',
+ new UntypedFormControl('', [
+ Validators.required,
+ Validators.min(0)
+ ])
+ );
+ this.savingProductSettingsForm.addControl(
+ 'daysToDormancy',
+ new UntypedFormControl('', [
+ Validators.required,
+ Validators.min(0)
+ ])
+ );
+ this.savingProductSettingsForm.addControl(
+ 'daysToEscheat',
+ new UntypedFormControl('', [
+ Validators.required,
+ Validators.min(0)
+ ])
+ );
} else {
this.savingProductSettingsForm.removeControl('daysToInactive');
this.savingProductSettingsForm.removeControl('daysToDormancy');