MVC.net 2 - change the HTML outputed by ValidationMessageFor - can this be down via templates?

Posted by Nathan Kelly on Stack Overflow See other posts from Stack Overflow or by Nathan Kelly
Published on 2010-05-12T15:50:52Z Indexed on 2010/05/12 15:54 UTC
Read the original article Hit count: 233

Filed under:
|
|
|

MVC.net 2 by default outputs validation messages like this:

<span id="UserName_validationMessage" class="field-validation-valid">A Validation message</span>

I would like it to do it like this:

<label id="UserName_validationMessage" class="field-validation-valid">A Validation message</label>

Is there a way to do it like the display and editor templates? Or is there another way to do it globally?

© Stack Overflow or respective owner

Related posts about mvc.net

Related posts about c#