I am using IValidatableObject/Validator to validate my mvc models. So I have something like this
public class Parent
{
public Child Child { get; set; }
}
public class Child
{
[Required]
public string Name { get; set; }
}
So if I run a validator on parent instance I get something like "Name is required".
What I would like is "Child.Name is required" so it needs to include the property name "Child". Can I do this and if I can, how will I do this?