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.3.tar.gz
(3.1 kB
view details)
Built Distribution
File details
Details for the file SinicValidate-1.0.3.tar.gz
.
File metadata
- Download URL: SinicValidate-1.0.3.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 008a43821e26c11b883638725bf3efac2cba38b0d731a539dca0587d29ba039f |
|
MD5 | b168505a8c3c4c1350fe878a5898cca4 |
|
BLAKE2b-256 | ab131625502bd9c8cac990527e8f3ea6d92ff831651d84538a2e11c45aa73be6 |
File details
Details for the file SinicValidate-1.0.3-py2.py3-none-any.whl
.
File metadata
- Download URL: SinicValidate-1.0.3-py2.py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26f79009d44b85c5ee9004d1d502aeffa6078a24995ac58a36966087e7decb27 |
|
MD5 | b8ffe9d96b0975c8455263e2a3b926bb |
|
BLAKE2b-256 | 02d93253617cbc3acae31214c413f6bea9f273be448173a5b1071ffef79760d5 |