I have a template driven form which contains child component
<form>
<child-comp [(model)]="model.Property" ngModel ngDefaultControl required></child-comp>
</form>
and child component also constains second child component:
<div class="row">
<child-comp2 [(model)]="model.Property1" ngModel ngDefaultControl required></child-comp2>
<input name="mobile" type="text" [(ngModel)]="model.Mobile" required>
</div>
child component 2
<div class="row">
<input name="name" type="text" [(ngModel)]="model.name" required>
</div>
if i dont fill name input, on submit form valid is true, but when I enter it and then remove validation working and isvalid is false.
how can i validate hierarchy component inputs?
Thanks