Wednesday, 7 August 2013

Angular JSCustom directive validation not working for dynamically generated inputs

Angular JSCustom directive validation not working for dynamically
generated inputs

I'm using nested ng-forms to validate dynamically generated inputs in
angular js, which is only partially working.
I've created a custom validation directive called 'wrinteger' which takes
two additional attributes (max and min).
For some reason, the max and min values aren't getting picked up and
causing the max and min error to always be raised. I've created a plunker
to help explain the situation. There are two forms in this plunker, the
testForm and newForm. testForm works since it is not dynamically
generated.
newForm is where the problem lies. Any help would be greatly appreciated.
Let me know if I need to make this more clear. Thank you
http://plnkr.co/edit/FEkKND4ays4rUrQ898gu?p=preview

No comments:

Post a Comment