MVC: does the model or controller check user input

What part in MVC does user input introduce? For example, a user registration system, a user enters data in a view where user input is cleared and checked for correct input, for example. correct email using php cleanup functions .. will this happen in the controller or model? and who will decide which errors are returned

thank

+5
source share
2 answers

According to the classic MVC (graphical applications) model, user input is also a model. Most PHP work is done using the Passive-MVC or MVC-2 model, where it is the domain of the controller or controller assistants. Make what looks most comfortable.

+10
source

-, , :
1. , , . . , , -
2. , (, , ) , . .
3. - .

+2

All Articles