Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

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):
Release History

Release History

This version
History Node

1.0.5

History Node

1.0.4

History Node

1.0.3

History Node

1.0.2

History Node

1.0.1

History Node

1.0.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
SinicValidate-1.0.5-py2.py3-none-any.whl (4.4 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Nov 9, 2016
SinicValidate-1.0.5.tar.gz (2.5 kB) Copy SHA256 Checksum SHA256 Source Nov 9, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting