WEB-458 Nominal/Unit Price Field Allows Zero and Negative Values in Share Product Creation Form (#2845)

This commit is contained in:
Soni Jay
2025-12-02 21:09:08 -06:00
committed by GitHub
parent e7df8f81e7
commit 9554e34941
2 changed files with 8 additions and 2 deletions
@@ -42,11 +42,15 @@
matTooltip="{{ 'tooltips.Unit/Nominal Price of each share' | translate }}" matTooltip="{{ 'tooltips.Unit/Nominal Price of each share' | translate }}"
formControlName="unitPrice" formControlName="unitPrice"
required required
min="1"
/> />
<mat-error> <mat-error *ngIf="shareProductTermsForm.get('unitPrice').hasError('required')">
{{ 'labels.inputs.Nominal Price' | translate }} {{ 'labels.commons.is' | translate }} {{ 'labels.inputs.Nominal Price' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong> <strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error> </mat-error>
<mat-error *ngIf="shareProductTermsForm.get('unitPrice').hasError('min')">
{{ 'labels.inputs.Nominal Price' | translate }} must be at least <strong>1</strong>
</mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field class="flex-48"> <mat-form-field class="flex-48">
@@ -66,7 +66,9 @@ export class ShareProductTermsStepComponent implements OnInit {
], ],
unitPrice: [ unitPrice: [
'', '',
Validators.required [
Validators.required,
Validators.min(1)]
], ],
shareCapital: [''] shareCapital: ['']
}); });