Skip to main content

A Python package for validating various types of data.

Project description

DataValidityCheck - Data Validation Package

Overview

DataValidityCheck is a Python package designed to validate personal data, including emails, phone numbers, dates, and URLs. It provides robust validation methods to ensure data accuracy and compliance with common formats.

Table of Contents

Installation

To install DataValidityCheck, use:

pip install DataValidityCheck

Features

  • Email Validation: Ensures a valid email format.
  • Phone Number Validation: Supports Nigerian phone numbers in local and international formats.
  • Date Validation: Validates dates in the DD/MM/YYYY format, including leap years.
  • URL Validation: Checks for valid domain structures, including http, https, and www prefixes.

Usage

First, import the DataValidator class:

from DataValidityCheck.validate_info_data import DataValidator

validator = DataValidator()

Email Validation

print(validator.validate_email("user@example.com"))  # True
print(validator.validate_email("invalid-email"))  # False

Phone Number Validation

print(validator.validate_phone("08123456789"))  # True
print(validator.validate_phone("+2348123456789"))  # True
print(validator.validate_phone("123456"))  # False

Date Validation

print(validator.validate_date("29/02/2024"))  # True (Leap year)
print(validator.validate_date("31/04/2023"))  # False (April has 30 days)

URL Validation

print(validator.validate_url("https://www.google.com"))  # True
print(validator.validate_url("htp://invalid.com"))  # False

Contributing

Contributions are welcome! To contribute:

  1. Fork the repository.
  2. Create a new branch (feature-branch).
  3. Commit your changes.
  4. Submit a pull request.

Ensure you run tests before submitting:

pytest tests/

Author

  • Main Maintainer: Olajide Oluwafemi Richard

License

This package is open-source and available under the MIT License.

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

datavaliditycheck-0.0.1.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datavaliditycheck-0.0.1-py2.py3-none-any.whl (3.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file datavaliditycheck-0.0.1.tar.gz.

File metadata

  • Download URL: datavaliditycheck-0.0.1.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for datavaliditycheck-0.0.1.tar.gz
Algorithm Hash digest
SHA256 5fab6d24f8e07be47dcb64fa8bbb2c6a9deac84aa11d610180a6e8a449d62302
MD5 e5fe61e93b11d60a4c240ee5c7a29fca
BLAKE2b-256 38f32bea5b8f2807f4df51635d4ee69c9913512aaa3aca71b2d057527458fa80

See more details on using hashes here.

File details

Details for the file datavaliditycheck-0.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for datavaliditycheck-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c274eae19b87f68415d7752f805e7eea3d6e53d9755de3849b5a2566be2cab0e
MD5 10d8a8b5cb52e3329dc930824d07f4f6
BLAKE2b-256 b536358387470cb45b45a5094e015480c1582da4572bff39f9f9706e972e7c3b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page