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.4.tar.gz
(2.4 kB
view details)
Built Distribution
File details
Details for the file SinicValidate-1.0.4.tar.gz
.
File metadata
- Download URL: SinicValidate-1.0.4.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b144da0da2daf29b347f48f9a12ee9dc6fe3b8750ac426faed5622fc8736a2c |
|
MD5 | d65060a14f3ae366840fa988308ce3ff |
|
BLAKE2b-256 | ea20f6086cee6b56243396cd0c138294f21336b202748429f2a4809204f0a843 |
File details
Details for the file SinicValidate-1.0.4-py2.py3-none-any.whl
.
File metadata
- Download URL: SinicValidate-1.0.4-py2.py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f0b1bcc4704a3cfd2e6386e070882ccab280a31ceed45cb40eee20e0427a07b |
|
MD5 | 276fbf402940bfb730168e08917a3016 |
|
BLAKE2b-256 | 98525f6c62c7e25ac548469b869138abafb1dbab6900d0122407ac8d40ac8c37 |