WEB-462 Lock-in Period Field Allows Zero and Negative Values in Save Product Creation Form (#2888)
This commit is contained in:
+13
@@ -19,7 +19,20 @@
|
|||||||
matInput
|
matInput
|
||||||
matTooltip="{{ 'tooltips.Used to indicate the length of time' | translate }}"
|
matTooltip="{{ 'tooltips.Used to indicate the length of time' | translate }}"
|
||||||
formControlName="lockinPeriodFrequency"
|
formControlName="lockinPeriodFrequency"
|
||||||
|
min="1"
|
||||||
|
step="1"
|
||||||
|
required
|
||||||
/>
|
/>
|
||||||
|
<mat-error *ngIf="savingProductSettingsForm.get('lockinPeriodFrequency').hasError('required')">
|
||||||
|
{{ 'labels.inputs.Frequency' | translate }} {{ 'labels.commons.is' | translate }}
|
||||||
|
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||||
|
</mat-error>
|
||||||
|
<mat-error *ngIf="savingProductSettingsForm.get('lockinPeriodFrequency').hasError('min')">
|
||||||
|
{{ 'tooltips.Frequency must be greater than zero' | translate }}
|
||||||
|
</mat-error>
|
||||||
|
<mat-error *ngIf="savingProductSettingsForm.get('lockinPeriodFrequency').hasError('pattern')">
|
||||||
|
{{ 'tooltips.Frequency must be a positive integer' | translate }}
|
||||||
|
</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field class="flex-48">
|
<mat-form-field class="flex-48">
|
||||||
|
|||||||
+8
-1
@@ -72,7 +72,14 @@ export class SavingProductSettingsStepComponent implements OnInit {
|
|||||||
createSavingProductSettingsForm() {
|
createSavingProductSettingsForm() {
|
||||||
this.savingProductSettingsForm = this.formBuilder.group({
|
this.savingProductSettingsForm = this.formBuilder.group({
|
||||||
minRequiredOpeningBalance: [''],
|
minRequiredOpeningBalance: [''],
|
||||||
lockinPeriodFrequency: [''],
|
lockinPeriodFrequency: [
|
||||||
|
'',
|
||||||
|
[
|
||||||
|
Validators.required,
|
||||||
|
Validators.min(1),
|
||||||
|
Validators.pattern('^[1-9]\\d*$')
|
||||||
|
]
|
||||||
|
],
|
||||||
lockinPeriodFrequencyType: [''],
|
lockinPeriodFrequencyType: [''],
|
||||||
withdrawalFeeForTransfers: [false],
|
withdrawalFeeForTransfers: [false],
|
||||||
minBalanceForInterestCalculation: [''],
|
minBalanceForInterestCalculation: [''],
|
||||||
|
|||||||
Reference in New Issue
Block a user