Anyone know if it is possible to do the following:
public class User
{
public Guid UserID { get; set; }
[Required(ErrorMessage="A school selection is required.")]
[Range(1, int.MaxValue, ErrorMessage="School not found. Please contact support at <a href='mailto:[email protected]'>[email protected]</a>")]
public int SchoolID { get; set; }
// ... other properties
}
And not have @Html.ValidationMessageFor(model => model.SchoolID) encode the HTML? Maybe I need to make a custom helper extension for this? Is there an easier way? Any guidance would be appreciated. If a helper extension is the way to go, how could I access the validation rules in the helper extension method to make sure the html doesn't get encoded?
Thanks.