2008年6月29日 星期日

[Debug]jQuery Validation Plugins的minLength無法設custom messages

原來minLength要用小寫的minlength

$("#activeVideoForm").validate({
rules: {
owner_mobile: {
required: true,
number: true,
minLength: 5
}
},
messages: {
owner_mobile: {
required: "*請輸入聯絡手機!",
number: "*請輸入正確的手機號碼!",
minLength: "*請輸入正確的手機號碼!"
}
}
});


$("#activeVideoForm").validate({
rules: {
owner_mobile: {
required: true,
number: true,
minlength: 5
}
},
messages: {
owner_mobile: {
required: "*請輸入聯絡手機!",
number: "*請輸入正確的手機號碼!",
minlength: "*請輸入正確的手機號碼!"
}
}
});

沒有留言:

wibiya widget