I am working on a new project, which includes several standard forms(Login, Registration, etc).
I have a basic client side validation with ng-required, type, and etc.
The problem is that I might get other kinds of errors from the Django REST backend, such as length, unique constraint and others, and those rules might change quite frequently.
The django REST server returns the errors in a JSON string, in shich the key is the field, and the value is the description of the error.
Is there anyway to write something in angular that will automatically append an error next to the invalid element, as a modular unit, that can be reused, so I won't have to add an error container and ng-bind for it per each field in my form?.
Thanks for any assistance.