I am using the SetCollectionValidator for a generic collection. My collection is a list of:
public class Answer {
public string QuestionConst { get; set; }
public string QuestionName { get; set; }
public bool Required { get; set; }
public string Answer { get; set; }
}
I have the validation setup and working so when an item is invalid the error message is something like: "'QuestionName' must not be empty". I would like the error message to say something like "'The First Question' must not be empty." (where The First Question is the value for QuestionName for one of the items).
I guess my question is: Is it possible to use the value of a variable in the error message or property name?