This is an uncertain answer, but I believe that the model should be responsible for the reliability of its data. If so, then the validation belongs to the model, however it may not always be achievable, and it may be necessary to perform a check in the view, however I think that this should be in addition to the check performed in the model, and not a replacement for it.
The problem with only validation in the view is that at some point you will probably need a different view of your data. Your site may become popular, and customers are requesting an XML-based API to generate their own views. Then do you rely on the client to verify the data?
Even if you don’t need to provide APIs, some clients may want customized views to be different enough to guarantee a completely different version of the page, and now you are checking for duplicate views.
I think the ideal scenario is for your model to validate, but for the validation results to be visible, to read and display the page again with the validation results displayed.
I think it is reasonable that the view perform validation if you want to instantly display validation data for the user, etc., but the final decision on the validity of the data should be left with the model.
source share