Following Domain Driven Design with MVVM/WPF
Posted
by msfanboy
on Stack Overflow
See other posts from Stack Overflow
or by msfanboy
Published on 2010-03-20T16:57:53Z
Indexed on
2010/03/20
17:01 UTC
Read the original article
Hit count: 357
Hello,
I have plain POCOs here and as INotifyPropertyChanged is a Interface for the View
s 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 ?
© Stack Overflow or respective owner