views:

150

answers:

2

Hi How can I change the default error message for required rule validation for example?

A: 

You can check the Localizing ASP.NET Validation blog post of Phil Haack.

korchev
I don't want to write for each field this :[Required(ErrorMessage = "Mandatory field not provided")]I want to change the default message that mvc2 gives me
Lullaby
A: 

You can write your own MyRequiredAttribute in wich change the default error message and use it.

msi