This question already has an answer here:
I am developing a simple php application with MVC architecture. My model is a user and view is simply a form render. Before submitting data by form to db I want to validate fields form and print if there are errors. Where can I put my validation function, in view or in model?
</div>