As I am dynamically creating a form and have implemented two-way binding, my next task is to implement validation.
Key Requirements:
- If there is a value in a field (e.g. Name: Raja), and that value is edited using $watch or $dirty, we should be able to check if it has been modified. Similarly, if the value is changed back to its original state, the $dirty status should return false.
- I need to figure out how to apply this validation to the entire form rather than individual fields.
Any assistance on this matter would be greatly appreciated.
For a simple example, you can refer to my Plunker.