Topics: Validation Application Block
Nov 27, 2007 at 6:01 AM
Edited Nov 27, 2007 at 6:03 AM
Can anyone tell me how to use the ObjectCollectionValidator?

I'm new to WPF, Xaml and the Enterprise Library and I am now working on a project that has business objects, decorated with validator attributes that are employed to perform validation. I'm fine with validating single items, strings, integers etc., but I have now come across a situation where an object's property takes/returns a list. This list is a list of strings, each must be at least 1 character in length. What I'm looking for is how do I complete the code below so that it will validate each item in the list against a StringValidator that must be at least one character in length and no more than 100.

[ObjectCollectionValidator( ????Something in here????)]
public List<string> ListOfItems