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]: from SinicValidate import validate, simple
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
validate
def phone(self, message, china_mobile=None, china_union=None, china_telcom=None, other_telphone=None):
def email(self, message, regex=None):
simple
def phone(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.5.tar.gz
(2.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file SinicValidate-1.0.5.tar.gz.
File metadata
- Download URL: SinicValidate-1.0.5.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
616cecda7b5c2fd1b0b65833a34a4b9ed998cceaa90588e647def6ede72b145f
|
|
| MD5 |
299ae534640a993b187a8cb4ed1bae09
|
|
| BLAKE2b-256 |
92fa3ea6c56bd096937bea6b646ffe46d4529808e972991b1d9c75d3da86f1f7
|
File details
Details for the file SinicValidate-1.0.5-py2.py3-none-any.whl.
File metadata
- Download URL: SinicValidate-1.0.5-py2.py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
633d5a33411a45ed9dcf3405b71df00d51656d06439160ae00d0c4923197c790
|
|
| MD5 |
09a541d0d32eba6940eca8faefc0f1e9
|
|
| BLAKE2b-256 |
4bc4942b82b8027b2d2548355e141af4d3d0da294303caaa31f5059da9a606e4
|