public class PageBase: PageData
{
[CmsChildren]
public virtual IEnumerable<PageBase> Children { get; internal set; }
}
But in EPiServer 7.5 DataAnnotationsValidator<T>.ValidateInstance for some reason reads ALL the properties (not only public virtual aut properties, or properties configured by your ContentScannerExtension/CustomContentScannerExtension contract) and tries to validate every collection (IList) item.
Is it a bug or feature?
I see 2 problems here:
1) I'd like to keep using my own properties in page types, but seems the latest release doesn't take this into account (I have several proposals, but it's a subject for another post)
2) I definitely want to be able to configure which properties to exclude from validation in the current situation
Hi,
I like clear unit testing approach and use https://github.com/VladimirLevchuk/EPiProperties library to have code like
But in EPiServer 7.5 DataAnnotationsValidator<T>.ValidateInstance for some reason reads ALL the properties (not only public virtual aut properties, or properties configured by your ContentScannerExtension/CustomContentScannerExtension contract) and tries to validate every collection (IList) item.
Is it a bug or feature?
I see 2 problems here:
1) I'd like to keep using my own properties in page types, but seems the latest release doesn't take this into account (I have several proposals, but it's a subject for another post)
2) I definitely want to be able to configure which properties to exclude from validation in the current situation