我从 nuGet 安装了 Fool-Proof,但它没有工作未捕获的错误。
Install-Package foolproof -Version 0.9.4518
当我安装它时,带有名称的新文件夹Clients Scripts
将添加到我的项目中,其中包含三个库FoolProof Unobtrusive
:FoolProof jQuery Validation
和FoolProof Validation
. 然后我在其中创建新包bundle.config
并与我的共享布局链接。
public bool active { get; set; }
[RequiredIf("active", true,ErrorMessage = "Code is Required")]
public int Code { get; set; }
它不显示验证消息。现在,当我检查控制台时,出现以下错误: