Closed potpath closed 8 years ago
I use django-angular with angularjs-1.3.7 and it works perfectly. Could you please try with that version. Currently I don't see any need for changing the code.
This bug happens when server-side validation of some input failed, and there is a djng-error="bound-field"
attribute on the corresponding input.
I've created a demo using the same code as the example site except using angular1.3.7
instead of angular1.2.28
, here.
Steps to reproduce the bug are,
You can see that the field validation is always invalid.
I think this bug is caused by the parser function pushed by djngError
directive, as I said above.
The parser removes
$error.bound
but causes$error.parse
instead. I think the reason isangular1.3.0-rc.4
changes how$parsers
is registered (See https://github.com/angular/angular.js/blob/master/CHANGELOG.md#bug-fixes-37). My fix is to always return value.Also, bounded field value may not be an empty string, e.g., unique constraint violation. My fix is to remove
$error.bound
only if new value does not equal to old value.