I have a form which has three components in it. The following is the html of the form:
<div class="p-r-0 m-t-1 p-r-half p-l-half">
<div class="tab-content">
<div *ngIf="vitalsData != null">
<emp-info *ngIf="far == '1'" [(dataContext)]="empData"></emp-info>
<emp-work *ngIf="sections == '2'" [(dataContext)]="empData"></faa-ch145>
</div>
</div>
<div class="right pull-top pos-relative">
<button class="btn btn-primary" type="button">Reset</button>
<button class="btn btn-primary" type="button">Save</button>
</div>
</div>
There are two components emp-info and emp-work. The emp-info and emp-work pages have some required fields. Now when I save the required fields should be validated. But I have the required fields in the child component and the save button in the parent component. Could anyone let me know how we could validate and display errors for the fields in the child component.