WEB-458 Nominal/Unit Price Field Allows Zero and Negative Values in Share Product Creation Form (#2845)
This commit is contained in:
+5
-1
@@ -42,11 +42,15 @@
|
||||
matTooltip="{{ 'tooltips.Unit/Nominal Price of each share' | translate }}"
|
||||
formControlName="unitPrice"
|
||||
required
|
||||
min="1"
|
||||
/>
|
||||
<mat-error>
|
||||
<mat-error *ngIf="shareProductTermsForm.get('unitPrice').hasError('required')">
|
||||
{{ 'labels.inputs.Nominal Price' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</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 class="flex-48">
|
||||
|
||||
+3
-1
@@ -66,7 +66,9 @@ export class ShareProductTermsStepComponent implements OnInit {
|
||||
],
|
||||
unitPrice: [
|
||||
'',
|
||||
Validators.required
|
||||
[
|
||||
Validators.required,
|
||||
Validators.min(1)]
|
||||
],
|
||||
shareCapital: ['']
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user