WEB-452 Validation Error: Total Number of Shares Allows Zero or Negative Values (#2843)

This commit is contained in:
Soni Jay
2025-12-02 21:08:27 -06:00
committed by GitHub
parent b2cab71c93
commit e7df8f81e7
2 changed files with 8 additions and 2 deletions
@@ -8,11 +8,15 @@
matTooltip="{{ 'tooltips.Total number of shares that a product is offering' | translate }}"
formControlName="totalShares"
required
min="1"
/>
<mat-error>
<mat-error *ngIf="shareProductTermsForm.get('totalShares').hasError('required')">
{{ 'labels.inputs.Total Number of Shares' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
<mat-error *ngIf="shareProductTermsForm.get('totalShares').hasError('min')">
{{ 'labels.inputs.Total Number of Shares' | translate }} must be at least <strong>1</strong>
</mat-error>
</mat-form-field>
<mat-form-field class="flex-48">
@@ -56,7 +56,9 @@ export class ShareProductTermsStepComponent implements OnInit {
this.shareProductTermsForm = this.formBuilder.group({
totalShares: [
'',
Validators.required
[
Validators.required,
Validators.min(1)]
],
sharesIssued: [
'',