I Have forms like this, in parent i am including multiple child components each child component is formgroup. now i need to check all this child forms validation on parent form when user click OnSubmit.
How should i trigger child form validations from parent on submit. I have used FormBuilder in each childcomponent.
I am able to do validation when user click on child fields but if user doesn't enter anything or touched anything and try to submit validations not showing errors.
parent.component.html
<form> <child1></child1> <child2></child2> <child3></child4> <child4></child4> '''' '''' '''' </form> child1.component.html
<div formgroup="child1group"> <div formarray= "child1array"> .... ... ... </div> </div child2.component.html
<div formgroup="child2group"> <div formarray= "child2array"> .... ... ... </div> </div please someone tell me how to do this validation on angular 4 ?