ASP.NET MVC - Add XHTML into validation error messages
- by Neil
Hi,
Just starting with ASP.Net MVC and have hit a bit of a snag regarding validation messages.
I've a custom validation attribute assigned to my class validate several properties on my model.
When this validation fails, we'd like the error message to contain XHTML mark-up, including a link to help page, (this was done in the original WebForms project as a ASP:Panel).
At the moment the XHTML tags such as "< a ", in the ErrorMessage are being rendered to the screen. Is there any way to get the ValidationSummary to render the XHTML markup correctly? Or is there a better way to handle this kind of validation?
Thanks