我无法使用jquery验证引擎检查kendo下拉列表的验证。如果我单击提交按钮,它会检查表单控件中的验证。所有字段验证都可以,但只有kendo下拉列表不正常。请收件箱解决方案。谢谢!
<script src="@VirtualPathUtility.ToAbsolute("~/Content/validation-engine/jquery.validationEngine.js")"></script>
<script src="@VirtualPathUtility.ToAbsolute("~/Content/validation-engine/jquery.validationEngine-en.js")"></script>
<form id="validateForm">
<div class="demo-section k-content">
<h4>Products</h4>
<input id="Category" type="text" name="Category" class="validate[required]">
<select id="products" class="validate[required]" style="width: 100%"></select>
</div>
</form>
<script>
$(document).ready(function() {
$("#products").kendoDropDownList({
dataTextField: "ProductName",
dataValueField: "ProductID",
dataSource: {
transport: {
read: {
dataType: "jsonp",
url: "/Products/List",
}
}
}
});
});
</script>
$("#Submit").click(function () {
javascript: $('#validateForm').validationEngine('attach');
if (!$('#validateForm').validationEngine('validate')) {
return;
}
)};