Merge pull request #3088 from JaySoni1/WEB-665-reccuring-deposit-product-form-negative-values-allowed-for-deposit-amount-fields

WEB-665 Reccuring deposit product form negative values allowed for deposit amount fields
This commit is contained in:
Jose Alberto Hernandez 2026-02-03 23:17:09 -05:00 committed by GitHub
commit b7ef0fcbd9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 6 deletions

View File

@ -12,12 +12,12 @@
<mat-form-field class="flex-31">
<mat-label>{{ 'labels.inputs.Minimum' | translate }}</mat-label>
<input type="number" matInput formControlName="minDepositAmount" />
<input type="number" min="0" matInput formControlName="minDepositAmount" />
</mat-form-field>
<mat-form-field class="flex-31">
<mat-label>{{ 'labels.inputs.Default' | translate }}</mat-label>
<input type="number" matInput formControlName="depositAmount" required />
<input type="number" min="0" matInput formControlName="depositAmount" required />
<mat-error>
{{ 'labels.inputs.Default' | translate }} {{ 'labels.inputs.Deposit Amount' | translate }}
{{ 'labels.commons.is' | translate }} <strong>{{ 'labels.commons.required' | translate }}</strong>
@ -26,7 +26,7 @@
<mat-form-field class="flex-31">
<mat-label>{{ 'labels.inputs.Maximum' | translate }}</mat-label>
<input type="number" matInput formControlName="maxDepositAmount" />
<input type="number" min="0" matInput formControlName="maxDepositAmount" />
</mat-form-field>
<mat-divider class="flex-98"></mat-divider>

View File

@ -64,12 +64,21 @@ export class RecurringDepositProductTermsStepComponent implements OnInit {
createrecurringDepositProductTermsForm() {
this.recurringDepositProductTermsForm = this.formBuilder.group({
minDepositAmount: [''],
minDepositAmount: [
'',
Validators.min(0)
],
depositAmount: [
'',
Validators.required
[
Validators.required,
Validators.min(0)
]
],
maxDepositAmount: [
'',
Validators.min(0)
],
maxDepositAmount: [''],
interestCompoundingPeriodType: [
'',
Validators.required