function myValid() {
var errorMsg = "";
var res = true;
//拿到要驗(yàn)證的值.
var receiveName = $("#receiveName").val();//姓名
var receiveMobile = $("#tMobile").val();//手機(jī)號(hào)
var validCode = $("#validCode").val();//驗(yàn)證碼
var regName = /^[\ue-\ufa]{,}$/;//驗(yàn)證姓名
var regMobile = /^[||||][-]\d{}$/;//驗(yàn)證手機(jī)
var regCode = /^\d{}$/;//驗(yàn)證碼
if (!regName.test(receiveName)) {
errorMsg += "姓名格式不正確;\n\r";
res = false;
}
if (!regMobile.test(receiveMobile)) {
errorMsg += "手機(jī)號(hào)格式不正確;\n\r";
res = false;
}
if (!regCode.test(validCode)) {
errorMsg += "請(qǐng)輸入位的數(shù)字驗(yàn)證碼;\n\r";
res = false;
}
if (!res) {
$.ligerDialog.error(errorMsg, "錯(cuò)誤提示");
}
return res;
}