I have a simple POCO here, and INotifyPropertyChangedthis is the interface for the view, which needs to be implemented in the ViewModel, and not in the model.
Now I want to show validation errors in the view next to each text field entered by the user.
I do not want to implement the interface IDataErrorInfoin my models, because it allows me to assume that I am not allowed to touch them, since they come from another Service / Provider.
I do not want to put my method IsCustomerFirstNameLenthValidin the model because I did not have access to it, or I just do not want to pollute my models using an interface that has nothing to do with it!
How can I test my bare POCO`s in the ViewModel and redirect the results to the view showing validation errors?
source
share