I've been tasked with implementing validation in my Angular app, and I need to show a popup listing all invalid fields upon form submission. This directive comes straight from my boss, so I have no say in the matter.
Currently, I have a method that reads the Angular form object to identify all $invalid fields on simple inputs. I then leverage a cached mapping of field names for generating an error string.
However, things get tricky with dynamic tables where users can add rows. While my function can recognize table names as invalid, once one row is valid, all forms are considered valid due to sharing the same name (i.e., 'FeeForm').
Is there any way to tweak this to handle situations when just one row in a table remains invalid? Hoping this request makes sense!