jQuery验证取决于 [英] jQuery validation depends
本文介绍了jQuery验证取决于的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以在equalTo
规则上添加依赖项?
Is it possible to add a depends onto an equalTo
rule?
即
rule {
myFormFierld: if textbox name has been filled out add this equalTo rule..
}
推荐答案
答案为 是 . 您只需要这样声明
The answer is yes. You just need to declare it that way
billingAddress: {
required:true,
minlength:5
equalTo: {
param: "#shippingaddress",
depends: "#compare:checked"
}
}
简单而美丽. 通过此票据.
Simple and beautiful. Via this ticket.
这篇关于jQuery验证取决于的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文