I would personally check for this in the controller. I read some posts
similiar to this and decide that validation should be upto the controller
and not the model.

However in implimentation it's quite nice (and easy) to have an Input Model
so that you can store specific things you may need to reuse again and again.
At the moment I simply store the filter and validation rules in it. You
could however, obviously, store anything you like.

Simon
p.s. I'm not saying this is the way, it's just a way that I've found to work
for my project.


Roman1975 wrote:
> 
> Where more correctly to check the data in model or in the controller:
> For example it is necessary to deduce certain messages of a forum,
> Messages of a forum it is transferred through it id:
> /message/id/1234/
> Whether where it is necessary to check there is such message with such id
> - 1234
> In model or in the controller?
> 
> 


-----
Simon Corless

http://www.ajb007.co.uk/
-- 
View this message in context: 
http://www.nabble.com/check--data-in-model-or-in-the-controller---tf4934875s16154.html#a14127256
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to