简体   繁体   English

为隐藏字段禁用xVal

[英]Disabling xVal for Hidden Fields

In my MVC application, I've got a page where I use a few hidden fields to make some calculations under the hood. 在我的MVC应用程序中,我有一个页面,在这里我使用一些隐藏字段在后台进行一些计算。 This page is loaded with xVal validations to make the data coherent. 此页面加载了xVal验证,以使数据一致。 But the problem is that the xVal is also validating the hidden fields which are only used at the page itself. 但是问题在于xVal还在验证仅在页面本身使用的隐藏字段。 Is there any way of disabling xVal for hidden fields? 有什么方法可以为隐藏字段禁用xVal吗?

一种方法是禁用字段,然后jQuery验证将忽略它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM