次のことが可能かどうかは誰でも知っています。
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:support@mysite.com'>support@mysite.com</a>")]
public int SchoolID { get; set; }
// ... other properties
}
@Html.ValidationMessageFor(model => model.SchoolID)
HTMLをエンコードしていませんか?多分私はこれのためにカスタムヘルパー拡張を作る必要がありますか? もっと簡単な方法はありますか?任意のガイダンスをいただければ幸いです。ヘルパー拡張機能を使用する場合、ヘルパー拡張メソッドの検証ルールにアクセスして、html がエンコードされないようにする方法を教えてください。
ありがとう。