To make full use of unobtrusive validation, I added the necessary attributes (DisplayAttribute, validation) to the models used in an MVC application.
However, one member of a model class did not retrieve the LabelFor text from the defined resource file, and I could not find the cause for this behavior.
After staring at the relevant code for several looong minutes, it struck me: the member was defined as field, rather than a property, missing the typical { get; set; }
I wish there was an attribute [AllPublicMembersMustBeProperties] which would cause the compiler to raise in error in such cases.
Just dreaming… 😉