2
Using Asp.Net MVC 5 need to create a required message with the following format:
"Required field! [Social Reason]"
Normally I would do so:
[Required(ErrorMessage = "Campo de preenchimento obrigatório! [Razão Social]")]
[Display(Name = "Razão Social")]
[StringLength(60)]
public string RazaoSocial { get; set; }
I would like to use the Required name in Errormessag in the Display. So when changing this value the name will be changed automatically in the message.