Validate Sinic Phone & Email & etc
Project description
Validate Sinic Phone & Email & etc
Refer: http://www.oschina.net/code/snippet_238351_48624
Installation
pip install SinicValidate
Usage
Python 2.7.5 (default, Mar 9 2014, 22:15:05) Type "copyright", "credits" or "license" for more information. IPython 4.0.0 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details. In [1]: import SinicValidate as validate In [2]: validate.phone('15171459560') Out[2]: {'isChinaMobile': True, 'isChinaTelcom': False, 'isChinaUnion': False, 'isOtherTelphone': False, 'isPhone': True} In [3]: validate.phone('11223344556') Out[3]: {'isChinaMobile': False, 'isChinaTelcom': False, 'isChinaUnion': False, 'isOtherTelphone': False, 'isPhone': False} In [4]:
Method
def phone(self, message, china_mobile=None, china_union=None, china_telcom=None, other_telphone=None): def email(self, message, regex=None):
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
SinicValidate-1.0.2.tar.gz
(3.2 kB
view details)
Built Distribution
File details
Details for the file SinicValidate-1.0.2.tar.gz
.
File metadata
- Download URL: SinicValidate-1.0.2.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8417ef9419b5755eaf5a79dc9a73045d29e683fc7f02e8faf3cdfde554ff839b |
|
MD5 | d16752f9d4a4ed6c663d6e12e7abe959 |
|
BLAKE2b-256 | 11ecbb51651fc3a51b81fe6e5ada187b59454cfb6eb6966e992bbbebf4190a1d |
File details
Details for the file SinicValidate-1.0.2-py2.py3-none-any.whl
.
File metadata
- Download URL: SinicValidate-1.0.2-py2.py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d7e9210d713be458d8b4ecb1deed42fafe9a252873311fbef8fb5f566e3e125 |
|
MD5 | 09f866e5c5d1ec4c5fcc642d6c5dd28a |
|
BLAKE2b-256 | 695ef6f76d6093b977fdf50aef6f90c4956eec208d415a9cc33e63e056a163a4 |