Following Domain Driven Design with MVVM/WPF
- by msfanboy
Hello,
I have plain POCOs here and as INotifyPropertyChanged is a Interface for the Views need its implemented in the ViewModel not the Model.
Now I want to show validation errors in the View beside every textbox the user typed in data.
I do not want to implemented the IDataErrorInfo interface in my Models because lets assume I am not allowed to touch them as they come from another Service/Supplier.
I do not want to put my IsCustomerFirstNameLenthValid Method into the Model because I could not have access to it or I just dont want to pollute my Models with interface`s having nothing to do there!
How can I validate my naked POCO`s in the ViewModel and forward the results to the View by showing validation errors ?