Http://www.cnblogs.com/wuhuisheng/archive/2011/03/23/1992652.html
The main code for phone number verification is as follows:
Public bool istelephone (string str_telephone)
{
Return System. Text. regularexpressions. RegEx. ismatch (str_telephone, @ "^ (\ D {3, 4 }-)? \ D {6, 8} $ ");
}
The main code used to verify the mobile
Verify IP Address, login account, password, EMAIL, phone number [including cell phone and landline phone
var patterns = new Object ();
var Thepat;
var r, re;
Patterns.ip =/^ (d{1,2}|1dd|2[0-4]d|25[0-5]) (. ( D{1,2}|1DD|2[0-4]D|25[0-5])) {3}$/g;
Patterns.id =/^[a-za-z0
/********************Function Name: Istelephonefunction function: fixed, mobile phone number check function, return True, reverse, return falsefunction parameters: obj, number to be checkedCheck rule:(1) Number, "(", ")" and "-"(2) The phone
Verify that the account is validVerification rules: a combination of letters, numbers, and underscores. It must start with a letter and contain 4-16 characters.
FunctionCheckuser (STR ){VaRRe=/^ [A-Za-Z] \ W {3, 15} $/;If(Re. Test (STR) {alert ("Correct");}Else{Alert ("Error") ;}} Checkuser ("jiade_cnblogs");//Call
Verify mobile phone numberVerification ru
The free api code of the mobile phone number attribution query, and the mobile phone number attribution api
Query the user's card type, carrier, region, and other information based on the mobile
Baidu mobile phone number attribution query api and return json processing, mobile phone number attribution api
I accidentally saw Baidu ApiStore on the Internet the day before yesterday. Then I went in curious and looked at it. I
} $/
---------------------------------------------
JS Regular Expression verification indicates whether the input is a mobile phone number or phone number
First give the original link: http://www.cnblogs.com/cxy521/archive/2008/06/05/1214624.html
Verify the regular ex
("Passport", function (value, Element) {
return this.optional (Element) | | CheckNumber (value);
"Please enter your Passport number correctly");
Mobile phone number Verification
JQuery.validator.addMethod ("IsMobile", function (value, Element) {
var length = Value.length;
var mobile =/^ ((13[0-9]{1}) | ( 15[0-9]{1})) +\d{8}) $/;
return this.optional (El
HTML code:Total number: The interface is as follows:JS Code:Calculate number of input mobile phone number, verify multi-number, filter duplicate number
Recent projects used in the need to call the real-name authentication interface, real-name authentication interface price compared to SMS is not a bit higher than a few cents, so that the conditions of the call authentication is strict, so use to JS verify the true name and JS authentication ID number.
Get to the point.
1.js Verify real name
JS
Java uses regular expressions for form validation tools class, can verify mailbox, mobile phone number, QQ number, etc.
Copy Code code as follows:
Package util;
Import Java.util.regex.Matcher;Import Java.util.regex.Pattern;
/*** Use regular expressions for form validation**/
public class Regexvalid
[0-9a-z] [a-z0-9\._-] {1,}@[a-z0-9-]{1,}[a-z0-9] (\.[ A-z]{1,}) +Many of the verification mailboxes that were found on the Internet do not support the verification of mailbox of level two domain nameHow to use JSfunction checkemail (email) { if (/^[0-9a-z][a-z0-9\._-]{1,}@[a-z0-9-]{1,}[a-z0-9] (\.[ A-z]{1,}) +$/. Test (email) { returntrue; } return false ;}How to use C #classProgram {Static voidMain (string[] args) {Console.WriteLine (Checkemail ("[email protected]")); Consol
This article introduces the use of jquery to verify the mailbox, verify the mobile phone number, the specific implementation of ideas and code as follows, interested friends can learn to
copy code code as follows:
//jquery Verify mailbox Function Checksubmitemail () { i
Digital Judgment Method: isNaN () function
The test () method determines whether the string matches the contents of the regular expression, and returns a Boolean value (True/false)
Verify that the Chinese name
function ischinaname (name)
{var pattern =/^[\u4e00-\u9fa5]{1,6}$/;
return pattern.test (name);
//Verify the mobile number
function Isphoneno (
1, verify whether it is a Chinese characterVerify that the nickname private Boolean verifynickname () {String nickname = Edt_username.gettext (). toString (); if (nickname = = NULL | | nickname.length () = = 0) {Edt_username.seterror ("cannot be empty"); return false; } int len = 0; char[] Nickchar = Nickname.tochararray (); for (int i = 0; i 2. Verify the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.