inside the virtual machine that contains the list, each time your list changes, iterates over the list and informs each object about a change notification about a property change either on properties that, as you know, may be invalid, or only on each property by specifying a name properties for an empty string.
It looks like your check may be related to several objects, in which case you need to check from the above virtual machine and set the error messages in the corresponding objects in the collection, and then raise the property change event on these objects.
I did this earlier with the public SetErrorMessage(string string) method for objects that implement IDataErrorInfo, and the public OnPropertyChanged(string) method so that I can set errors and raise the context property changed by events outside the object.
Errors will be stored in the dictionary, and the this[string] property will look for a dictionary for errors, as well as run its own check.
source share