[Code Note] mobile phone number verification, note mobile phone number verification
Code:
-(Void) viewDidLoad {[super viewDidLoad]; // Do any additional setup after loading the view. // The output value 1 or 0.1 is YES, and 0 is N
// Check whether it is composed of digitsCopy codeThe Code is as follows:Function isDigit (s){Var patrn =/^ [0-9] {1, 20} $ /;If (! Patrn.exe c (s) return falseReturn true} // Check Logon Name: You can enter only 5-20 strings starting with a letter, which can contain numbers, "_", and ".".Copy codeThe Code is as follows:Function isRegisterUserName (s){Var patrn =/^ [a-zA-Z] {1} ([a-zA-Z0-9] | [. _]) {} $ /;
Js randomly generates name, mobile phone number, ID card number, bank card number [Implementation Code], js bank card
During development and testing, you often need to enter the name, mobile phone
The following is a small Editor of the js generator code written by myself. The code is relatively simple and highly practical. If you are interested, let's study it together, you often need to enter the name, mobile phone number, ID card number, and bank card
Development test, often need to fill in the name, mobile phone number, ID card number, bank card number, both in line with the format requirements, and can not repeat. People will search the internet for all kinds of generators.
The following small series of their own write a JS generator
Development testing, often need to fill in the name, mobile phone number, ID card number, bank card number, both to meet the format requirements, and can not repeat. People will search the internet for all kinds of generators. Can you write a simple generator of your own? The following is a randomly generated name, mob
[Code Note] verifies the mobile phone number, email address, license plate number, and license plate number.
I. Code.
-(Void) viewDidLoad {[super viewDidLoad]; // Do any additional setup after loading the view. NSLog (@ "------ %
The following is the Android read the user number, mobile phone number, SIM card serial number of the implementation code is introduced, need friends can come to refer to the next
1, using the method provided by Telephonymanager, the core
In my last article, I discussed how to verify the legality of the 15, 18-bit ID number and get some simple information
For example: Identity, birthdays, gender, etc.
Now, you can take the city and the area.
Copy Code code as follows:
Download (64KB)
Recommendation: The region
Use JAVA code to obtain some basic information about the mobile phone (the local number, SDK version, system version, and mobile phone model) and javasdk
The Code is as follows:
Package com. zzw. getPhoneInfos; import android. app. activity; import android. content. context;
Get mobile phone Model: Android.os.Build.MODEL
Get the phone's SDK version number: Android.os.Build.VERSION.SDK
Get the phone's current network type code as follows: This is a tool class that you can save for later use.
Package com.iqtogether.qxueyou.support.util;
Import Android.content.Context;
Import Android.net.ConnectivityManager;
Import Android.net
Old style, no more nonsense to say, directly to everyone paste Java code.
The code is as follows:
Package Com.zzw.getPhoneInfos;
Import android.app.Activity;
Import Android.content.Context;
Import Android.os.Build;
Import Android.os.Bundle;
Import Android.telephony.TelephonyManager;
Import Android.util.Log; public class Mainactivity extends activity {@Override protected void onCreate (Bundle savedinst
Recently, the company is planning to promote it. I am responsible for collecting mobile phone numbers and paying for a lot of software I have found on the Internet. I wrote one on my whim today. You are welcome to download and use it for free. There are no functional limitations, if you have any comments during use, you can leave a message.
Operating Platform: Windows OS +. NET 2.0
Installation-free, direct download
:/Files/gudufy/mobile
if ((document.regform.u_telphone1.value.length==0) | |! Checkifnumber (Document.regform.u_telphone1.value)) {
Alert ("Hint: the phone must be filled out!") ");
Document.regform.u_telphone1.focus ();
return false;
}
if ((document.regform.u_telphone2.value.length==0) | |! Checkifnumber (Document.regform.u_telphone2.value)) {
Alert ("Hint: the phone must be filled out!") ");
Document.regform.u_telphone2
[Code Note] iOS-mobile phone version number, model, operating system version, unique device identifier, ios-version number
I. Code.
RootViewController. m
# Import "ViewController. h "# import" sys/utsname. h "@ interface ViewController () @ end @ implementation ViewControlle
JS Common mobile phone number ZIP code number regular verification
*/
Phone number Verificationfunction Istelephone (str){RegExp =/^[0-9]+ (-[0-9]+) {1,2}$/;return Regexp.test (str);}
ZIP
The following is the code for verifying the phone number in JS. It is very practical and is the first code for everyone:
The Code is as follows:
Function Checkreg (){// Verify the phone num
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.