Is it against the correct MVC style for sending error messages from a model?

Or should error messages be displayed in the view? Usually I try to just send true and false from my models.

Great to hear what you guys are doing!

+3
source share
3 answers

agreed. The model should be happy to drop things while it is generated from information that is easily accessible to the model.

+3
source

I would expect the model to throw an exception that can be handled by the view (and, if necessary, presented the end user).

+3
source

, . , . , . / , , .

+2

Source: https://habr.com/ru/post/1726750/


All Articles