Here form code available. This form type is template driven form In this form SUBSCRIPTION_ID input available. I need add validation like only blank space not allowed.
<form name="ResgisterData" #resgisterData = "ngForm" (ngSubmit)="signUp(resgisterData.value)" novalidate>
<label>SUBSCRIPTION_ID</label>
<input type="text" [ngClass]="{ 'alert-danger' : subscriptionId.touched && subscriptionId?.errors?.required }" role="textbox" name="Guid" #subscriptionId="ngModel" [(ngModel)]="attendeLabDetails.SubscriptionGuid" autocomplete="off" class="form-control" required />
<button role="button" class="btn btn-primary blue" [disabled]="resgisterData.invalid">Register </button>
</form>
patternattribute with regex value of/^\S*$/