Hi,
I want to validate a contactlist, its basically a collection. First I want to check if there are any duplicate Unique IDs in the list, then I want to use the ContactValidator I created to validate each item in the collection.
This way the caller just needs to validate the list to know if all the objects in the list are correct, and there are no duplicates.
The "SetCollecitonValidator" only works on members below is what I'm trying to achieve,
public ContactListValidator() { RuleFor(rl => rl) .Must(NoDuplicateUniqueIds).WithName("ContactList") .WithMessage("Unique ID must be unique"); RuleFor(rl => rl) .SetCollectionValidator(new ConatactValidator()); }