I have a form that has dynamic fields of amount for which I am using formArray. The user can generate multiple fields of the amount.
What I want is to calculate the total values in all dynamic fields and show an error message if the total amount is exceeded.
The problem is when I looped over the FormArray with value change and then returned a promise on resolve but it only shows the validation error for the first field. Below is the StackBlitz. You can see it in the console. When you type some number that exceeds the total it will show error for the first field. For the rest, if you exceed the total it doesn't show an error. https://stackblitz.com/edit/angular-sbidt3