Hi, I am trying to learn Domain Driven Design and recently read that lots of people advocate creating a ViewModels for your views that store all the values you want to display in a given view.
My question is how should I do the form validation? should I create separate validation classes for each view, or group them together? I'm also confused on what this would look like in code.
This is how I currently think validation and viewmodels fit in to the scheme of things:
View (some user input) -> Controller -> FormValidation(of ViewModel) -> (If valid map to ViewModel to Domain Model) -> Domain Layer Service -> Infrastructure
Thanks!
P.S. I use Asp.net MVC with C#