Suppose I have User domain class and RegistrationCommand class. So when user is registering on website there are two steps for data validation:
- RegistrationCommand constraints validation.
- User domain object constrains validation.
Controller action receive command object and pass it to view in a model after computing. So, I want to join domain objects' validation errors with command objects' errors and pass them as a part of command object. What is the best way to do that?