WEB-461 Minimum Active Period Field Allows Zero and Negative Values in Share Product Creation Form (#2881)

This commit is contained in:
Soni Jay
2025-12-16 06:12:14 -06:00
committed by GitHub
parent 71ca708713
commit 0d653ae6bf
2 changed files with 15 additions and 2 deletions
@@ -74,7 +74,13 @@
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Frequency' | translate }}</mat-label>
<input type="number" matInput formControlName="minimumActivePeriodForDividends" />
<input type="number" matInput formControlName="minimumActivePeriodForDividends" min="1" step="1" required />
<mat-error *ngIf="shareProductSettingsForm.get('minimumActivePeriodForDividends').hasError('required')">
Frequency is <strong>required</strong>
</mat-error>
<mat-error *ngIf="shareProductSettingsForm.get('minimumActivePeriodForDividends').hasError('min')">
Frequency must be greater than zero
</mat-error>
</mat-form-field>
<mat-form-field class="flex-48">
@@ -79,7 +79,14 @@ export class ShareProductSettingsStepComponent implements OnInit {
Validators.pattern(/^[0-9]+$/)
]
],
minimumActivePeriodForDividends: [''],
minimumActivePeriodForDividends: [
'',
[
Validators.required,
Validators.min(1),
Validators.pattern(/^[0-9]+$/)
]
],
minimumactiveperiodFrequencyType: [''],
lockinPeriodFrequency: [''],
lockinPeriodFrequencyType: [''],