Hi,
I have a very basic entity model which I'm trying to add custom validation messages to.
My metadata looks like this:
namespace My.Models {
[MetadataType(typeof(My.Models.ConsumerMetadata))]
public partial class Consumer
{
}
public class ConsumerMetadata
{
[StringLength(5)]
[Required(ErrorMessage="First name is an absolute must!")]
public string FirstName { get; set; }
} }
The problem is that the data annotation I'm adding not being propagated to the view errors - those remain the default errors.
I'm sure its something simple I'm missing here...