Hi StackOverFlow community, I m struggling with a custom validation in a template driven forms. I have a stepper component and I have a unique form that wraps all the groups. In each step I would like to have the sum of the inputs to be 100%, otherwise it should display an error (like it is for the required and the min and max).
I created an array which it should push every value of the single group, but instead it's pushing each key value and it creates a new array in each input.
Here you have the stackblitz link : https://stackblitz.com/edit/clarity-light-theme-v2-7qtpcz?file=src%2Fapp%2Fapp.component.html,src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fapp.module.ts
Thank you in advance :)
edit: The checkPercentage function works fine, but I need to fix the directive which is not working as the checkPercentage function does and I want to have the same behaviour.