In TS code:
validationActive = false;
validations: any = Validations;
validateMe: boolean[] = [];
validate($event, index){
this.validateMe[index] = $event;
console.log(this.validateMe);
}
In HTML:
<validate-me
[value]="user.name"
(valid)="validate($event, 1)"
[active]="validationActive"
[validations]="[validations.name]">
Things to know:
On click of your submit button, you want to call ValidateMe.valid(this.validateMe)
If that value is false, set this.validationActive = true
This will show all the errors in your inputs.