Use and verify the regular expressions and JavaScript Regular Expressions of QQ numbers in javascript
I don't need to talk much about it. I just paste the Regular Expression Code to you.
Function myValid () {var errorMsg = ""; var res = true; // get the value to be verified. var upload ename = $ ("# upload ename "). val (); // name var receiveMobile =$ ("# tMobile "). val (); // mobile phone number var validCode = $ ("# validCode "). val (); // Verification Code var regName =/^ [\ ue-\ ufa] {,} $ /; // verify the name var regMobile =/^ [|] [-] \ d {}$ /; // verify the mobile phone var regCode =/^ \ d {}$/; // verification code if (! RegName. test (canonical ename) {errorMsg + = "the name format is incorrect; \ n \ r"; res = false;} if (! RegMobile. test (receiveMobile) {errorMsg + = "Incorrect mobile phone number format; \ n \ r"; res = false;} if (! RegCode. test (validCode) {errorMsg + = "enter a digit Verification Code; \ n \ r"; res = false;} if (! Res) {$. ligerDialog. error (errorMsg, "error prompt");} return res ;}
Below is a simple regular expression for verifying QQ numbers.
The Code is as follows:
[1-9] [0-9] {4 ,}