Won't Fix
Details
Details
Assignee
Unassigned
UnassignedReporter
Gian Marco Gherardi
Gian Marco GherardiComponents
Affects versions
Priority
Who's Looking?
Open Who's Looking?
Created May 24, 2010 at 6:35 AM
Updated December 5, 2010 at 1:41 PM
Resolved December 5, 2010 at 1:41 PM
Consider the following example:
public class BaseEntity
{
public string StringValue { get; set; }
}
public class Entity : BaseEntity {}
public class BaseEntityValidation : ValidationDef<BaseEntity>
{
public BaseEntityValidation()
{
Define(x => x.StringValue).NotNullableAndNotEmpty();
}
}
When validating Entity, rules defined for BaseEntity aren't considered. The workaround is to add an empty class like the following:
public class EntityValidation : ValidationDef<Entity> {}
Attached is a test that demonstrate the bug.