Everyone using MVC generally knows about the ‘Required’ attribute for properties in the model. It’s surrounded by square brackets and placed just above the property.

However, what if you want to change the displayed message to more user-friendly text? Well, it turns out that it’s very easy.

All you need to do is surround the message itself in parentheses inside the square brackets, so it would look something like this:

[Required(ErrorMessage = "This is my customized required message.")]