下面是我的代码。
$("#aspNetForm").validate({
rules: {
txtManufacturerName: {
required: true
},
ddlStatus: {
selectstatus: true
},
file:
{
requiredOnAdd: true,
accept: 'jpg|gif|png|jpeg',
filesize: 3145728
}
},
messages: {
txtManufacturerName: {
required: "Kindly Enter Name"
},
file: {
filesize: "Kindly Upload less than 3MB "
}
},
onsubmit: false
});
插入此记录页面时不会触发filesize
.
请让我知道该怎么做?
我正在使用 MVC3 C#