【发布时间】:2017-11-10 17:59:16
【问题描述】:
我在我的模型中为 CKeditor 使用 AllowHtml,并且我还分配了必填字段,但验证不起作用,我的模型就像:-
[Display(Name = "Introduction Details:")]
[Required(ErrorMessage = "Introduction Details is required.")]
[AllowHtml]
public string Introduction { get; set; }
【问题讨论】:
-
你需要重新配置验证器 - 参考this answer