0
如何使用jQuery驗證框架的一個選擇選項卡上我怎樣才能在選擇標籤使用jQuery驗證框架
這是我的小提琴
http://jsfiddle.net/2yXsL/377/
我曾嘗試爲
<select id="BsnessType" name="BsnessType" class="span12 valid">
<option value="SELECT">SELECT</option>
<option value="101">Theatre</option>
<option value="102">Restaurant</option>
</select>
$('#mailer').validate({
focusInvalid: false,
debug: true,
rules: {
name: {
required: true
},
email_address: {
required: true,
},
BsnessType: {
required: true,
}
},
messages: {
name: {
required: 'name required'
},
email_address: {
required: 'email required',
email: 'email address is not valid'
},
BsnessType: {
required: 'BsnessType is required',
}
},
submitHandler: function(event, validator) {
if ($("#mailer").valid()) {
callformsubmit();
return false;
}
}
});
請讓我知道如何做到這一點?
非常好,非常感謝。 – Kiran 2015-04-01 09:03:44