Am using the enterprise library validation.
I have classes like below
public class Customer
{
public int Id { get; set; }
[NotNullValidator(MessageTemplate = "{1} is null")]
public string FirstName { get; set; }
[NotNullValidator(MessageTemplate = "{1} is null")]
public string Surname { get; set; }
}
public class Order
{
public int Id { get; set; }
[NotNullValidator(MessageTemplate = "{1} is null")]
public Customer Customer { get; set; }
}
When am using the order object and surname and first name are null validation should kick in ,but it does not.
What am i doing wrong?
Note: Am using it with WCF