I have inherited a class from System.ComponentModel.DisplayNameAttribute. When I add the attribute for property, the property's attribute is not used by FV. I see from the source code that it uses hard-coded class name. See FluentValidation.ValidatorOptions private static string GetDisplayName(MemberInfo member). IMO it should accept any class that can be assigned to typeof(System.ComponentModel.DisplayNameAttribute).
For now I have fixed the problem by giving the class name DisplayNameAttribute (which lives in my namespace).
Comments: Instead of attr.type.Name == "DisplayNameAttribute" I would prefer typeof(System.ComponentModel.DisplayNameAttribute).IsAssignableFrom(attr.type)
For now I have fixed the problem by giving the class name DisplayNameAttribute (which lives in my namespace).
Comments: Instead of attr.type.Name == "DisplayNameAttribute" I would prefer typeof(System.ComponentModel.DisplayNameAttribute).IsAssignableFrom(attr.type)