I'm working on an admin where users can add X amount of cells. Each cell consists of:
- name
- imageURL
- destination link
User can bulk add cells (starts with 8, they could add 20 at once) or one at a time.
I need to validate each field to confirm that they are good. I had planned on using angular form validation for this. Unfortunately there is the requirement which states that should the user have X # of items, but only filled in half (leaves any entire cell empty) just disregard that cell as a whole.
The problem lies in that if there are 10 cells on load, the form (holds all the cells) is pristine / invalid. I fill in all 10 items, form is now dirty / valid. I add 5 more, form is dirty / invalid. fill out 2 of those cells and want to submit, form is still dirty / invalid when I would want it to be dirty / valid
Any thoughts on this?
Example plunkr: http://plnkr.co/edit/qwObH5LnxLvgJydJlJVS?p=preview
Bonus points on if I can do this without having to use a form tag.