Catalysts / cat-angular

Basic support for Angular Apps
Apache License 2.0
7 stars 16 forks source link

Mg/validation context #37

Closed mangei closed 9 years ago

tsalzinger commented 9 years ago

in general i'm not very sure about the necessity for this change

a field error by definition has to be an error associated with an input field, a global error reflects a general error state (of either the application itself or a generic failure in the model, unspecific to a certain field)

could you please give me an example of which error you would consider a field error in the backend, but not have an appropriate input field in your ui?

mangei commented 9 years ago

in general it was necessary to introduce validation groups, because we had multiple forms and we had to map the response to the corresponding input element. If you need more details on that, I will give you a detailed answer.

But I think you comment is more related to the unknown fields functionality. I consulted @mdopplinger. He will give an answer on that question. What I know is, that we had the case, that an entity was extended in the backend by some developer with some constraints, but the input field in the frontend was not added. The frontend did not show any message (because there was no error message assignment for the missing field). If this is the case, with the new functionality, the error is immediately visible by printing the error message of the missing field as a global message.

tsalzinger commented 9 years ago

ok, i think i understand what you want to achieve and i'm pretty sure it works out quite fine one thing though: i would like to see some tests ;)

mangei commented 9 years ago