No more nonsense to say, directly to everyone paste regular expression code.
function Myvalid () {
var errormsg = "";
var res = true;
Get the value you want to validate.
var receivename = $ ("#receiveName"). Val ();//Name
var receivemobile = $ ("#tMobile"). Val ()/mobile number
var Validcode = $ ( "#validCode"). Val ()//Verification code
var regname =/^[\ue-\ufa]{,}$/;//authentication name
var regmobile =/^[| | | | [-]\d{}$/;//Verification mobile phone
var regcode =/^\d{}$/;//Authentication Code
if (!regname.test (Receivename)) {
errormsg = "name format is not correct; \ n \ r ";
res = false;
if (!regmobile.test (Receivemobile)) {
errormsg + = "Cell phone number format is not correct; \n\r";
res = false;
if (!regcode.test (Validcode)) {
errormsg = "Please enter a bit of digital verification code; \n\r"
; res = false;
if (!res) {
$.ligerdialog.error (errormsg, error hint);
}
return res;
}
Share a very simple regular expression that verifies the QQ number.
The code is as follows: