In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article introduces the relevant knowledge of "how to verify email addresses with js and php". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
There are many ways to verify your email address. On the browser side, js mailbox validation can be detected by regular expressions.
For example:
The copy code is as follows:
Function isEmail (email) {
Return / ^ (([Amurz] |\ d | [! #\ $% &'\ *\ +\ -\ / =\?\ ^ _ `{\ |} ~] | [\ u00A0 -\ uD7FF\ uF900-\ uFDCF\ uFDF0-\ uFFEF]) + (\. ([amurz] |\ d | [! #\ $% &'\ *\ +\ -\ /\ ^ _` {\ |} ~] | [\ u00A0 -\ uD7FF\ uF900-\ uFDCF\ uFDF0-\]) UFFEF]) +) *) | (\ x22) (\ x20 |\ x09) * (\ x0d\ x0a))? (\ x20 |\ x09) +)? ([\ x01 -\ x08\ x0b\ X0c\ x0e -\ x1f\ x7f] |\ x21 | [\ x23 -\ x5b] | [\ x5d -\ x7e] | [\ u00A0 -\ uD7FF\ uF900-\ uFDCF\ uFDF0-\ uFFEF]) | (\ ([\ x01-\ x09\ x0b\ x0c\ x0d-\ x7f]) | \ u00A0 -\ uD7FF\ uF900-\ uFDCF\ uFDF0-\ uFFEF]) * (\ x20 |\ x09) * (\ x0d\ x0a))? (\ x20 |\ x09) +)? ((\ x22)) @ (([a-z] |\ d | [\ u00A0 -\ uD7FF\ uF900-\ uFDCF\ uFDF0-\ uFFEF]) | ([aMuz] |\ d | [\ u00A0 -\ uD7FF\ uF900-\ uFDCF\ uFDF0-\ uFFEF]) D |-|\. | _ | ~ | [\ u00A0 -\ uD7FF\ uF900-\ uFDCF\ uFDF0-\ uFFEF]) * ([aanthz] |\ d | [\ u00A0 -\ uD7FF\ uF900-\ uFDCF\ uFDF0-\ uFFEF]))\)\) + (([aMalayz] | [\ u00A0 -\ uD7FF\ uF900-\ uFDCF\ uFDF0-\ uFFEF]) | ([alyz] | [\ u00A0 -\ uD7FF\ uF900-\ uFDCF\ uFDF0-\ uFFEF]) ([amerz] | \ d |-|\. | _ | ~ | [\ u00A0 -\ uD7FF\ uF900-\ uFDCF\ uFDF0-\ uFFEF]) * ([Amurz] | [\ u00A0 -\ uD7FF\ uF900-\ uFDCF\ uFDF0-\ uFFEF])) $/ i.test (email)
}
The call is simple:
The copy code is as follows:
If (isEmail ('youremail@yourdomain.com')) {console.log (' This is email is valid');}
If it is for server-side authentication. Like php, the simplest thing is:
The copy code is as follows:
/ *
* verify the validity of email addresses
, /
Function isEmail ($mail_address) {
Return filter_var ($mail_address, FILTER_VALIDATE_EMAIL)
}
That's all for the content of "how to verify email address with js and php". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.