SaaS CMS has officially launched! Learn more now.

Custom xForm error messages in MVC


I'm having a form with two input components validated as required and email. 

When leaving both fields blank and submitting the form inline error messages are shown telling me that the first field is required and second one is not a valid email address. So far so good, but I would like manipulate these error messages and give them in different languages. How do I do that? Before my submit action is hit in my controller the ModelState propery is populated with the error messages. It's possible for me to change the messages already entered in the ModelsState property, but that seems like the wrong way to handle this.

Any ideas?

Feb 07, 2013 12:04

Hi Tobias,

did you solve this?

May 08, 2013 8:55

(Response to old question, but someone might find this handy)


Hi have a look at this blog post, it lists the "resource keys":

and if you haven't noticed that the LAng folder is gone, read this one to know how to implement the xml based resources :

then you can simply have in you xml file something like this


          <inlineerrormessage>Your customized invalid email format message</inlineerrormessage>


Edited, May 08, 2013 13:13
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.