PHP: The function used to verify the validity of the ID card. php: The function used to verify the ID card.
For more information, see the code:
Function is_idcard ($ id) {$ id = strtoupper ($
PHP Extract the birthday date in the ID number and verify whether it is an adult function, ID number adult
PHP extracts the birthday date from the ID number and determines whether a function is adult. Can be determined at the same time 15-bit and 18-bit ID card, by my pro-t
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.
JS Verify the real name, is used to match
QQ Group of brothers asked "who gave me an ID card number to verify the code" Just I also need to find the next code from the Internet, feel good, suitable for 15 and 18 ID card, online good garbage station, are directly collected csdn problem, the answer is no, HanUse JavaScript to verify 15 or 18
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
The following collection of people commonly used in the development of a variety of forms to verify the function, including a mailbox, telephone, IP, website, date, ID, etc., I hope to help you
#region Verify Mailbox Authentication mailboxes
/**////Verifying mailboxespublic static bool Isemail (string source){return Regex.IsMatch (source, @ "^[a-za-z0-9] ([_
The following lists various forms of verification functions that are commonly used in development, including email, phone, ip, website, date, ID card, etc.
# Region verified email address
/** // /// Verify the email address/// /// /// Public static bool IsEmail (string source){Return Regex. IsMatch (source, @ "^ [A-Za-z0-9] ([_.-]? [A-zA-Z0-9] +) *) @ ([A-Za-z0-9] +) ([.-]? [A-zA-Z0-9] +) *). ([A-Za-z] {2
According to the ID number coding rules to verify its validity, the specific implementation of the following, you can refer to the following The following is based on the ID card number coding rules, use JS to validate the code nbsp; nbsp; Idcard-validate.js code as follows:nbsp; nbsp; code:/**nbsp; * ID card 15-bit
This article mainly for you to share the two paragraph PHP verification ID card number is the correct function, interested in small partners can refer to
ID Card Verification The simplest is the length of the judgment, of course, this is very simple to break if you want more rules we need to do some of the ID card number according to the generated rules to
When we do various programming design, we often encounter the need for personnel registration, but the information on the registration of people to verify the means but also
Very ineffective, because it is difficult for us to judge whether a person's information is true or not! We just try to check his message as much as possible.
Now let's take a look at some simple school as tests on the ID card.
1 2 3 4
in column C is converted from a text format to a real "date" format. However, careful you should have found that only the correct date can be successfully converted, its alignment automatically turned to "right", and the wrong date is not converted, is still text formatting, alignment is still "left", Adjust column C to enlarge, "right right, wrong left" (Figure 3)! All you have to do is proofread the wrong ID numbers and correct them.
A
Structure of the ID card number
The ID card number is a characteristic combination code, which consists of a 17 digit ontology code and a check code.
Order from left to right according to this: six-digit address code, eight-digit birth date code, three-digit sequential code and a digital parity code.
Address code (top six digits)
The administrative division code of the county (city, Flag, district) of t
[17] = ValideCode [valCodePosition]) {Return true;} Else {Return false;}}/*** Identify a male or female by ID card* @ Param idCard: 15/18-digit ID card number* @ Return 'female '-female, 'male'-male*/Function maleOrFemalByIdCard (idCard ){IdCard = trim (idCard. replace (// g, ""); // process the ID card number. Contains spaces between characters.If (idCard. leng
Using php to verify the ID card function is very authoritative. it is very useful to verify the ID card in personal information. using php to verify the ID card function is very authoritative. it is very practical to
How does jQuery use regular expressions to verify mobile phone numbers, ID card numbers, Chinese names, and jquery regular expressions?
Digit Determination Method: isNaN () function
The test () method is used to determine whether the regular expression content is matched in the string. the return value is a boolean value (true/false)
// Verify the Chinese name
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.